mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
tests: fix nil deref
This commit is contained in:
parent
bebe04b56b
commit
9191e97ca3
1 changed files with 3 additions and 3 deletions
|
|
@ -162,9 +162,9 @@ func (t *BlockTest) Run(snapshotter bool, scheme string, tracer vm.EVMLogger, po
|
|||
}
|
||||
// Import succeeded: regardless of whether the _test_ succeeds or not, schedule
|
||||
// the post-check to run
|
||||
defer func() {
|
||||
postCheck(result, chain)
|
||||
}()
|
||||
if postCheck != nil {
|
||||
defer postCheck(result, chain)
|
||||
}
|
||||
cmlast := chain.CurrentBlock().Hash()
|
||||
if common.Hash(t.json.BestBlock) != cmlast {
|
||||
return fmt.Errorf("last block hash validation mismatch: want: %x, have: %x", t.json.BestBlock, cmlast)
|
||||
|
|
|
|||
Loading…
Reference in a new issue