mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
blockchain: make scriptval_test fail more nicely
Return early when failing on len(blocks) > 1. Check for len(blocks) == 0 so we can fail on that condition with an error message instead of a panic.
This commit is contained in:
parent
fb90c334df
commit
c20db1cf14
@ -27,6 +27,11 @@ func TestCheckBlockScripts(t *testing.T) {
|
||||
}
|
||||
if len(blocks) > 1 {
|
||||
t.Errorf("The test block file must only have one block in it")
|
||||
return
|
||||
}
|
||||
if len(blocks) == 0 {
|
||||
t.Errorf("The test block file may not be empty")
|
||||
return
|
||||
}
|
||||
|
||||
storeDataFile := fmt.Sprintf("%d.utxostore.bz2", testBlockNum)
|
||||
|
Loading…
x
Reference in New Issue
Block a user