forked from cerc-io/plugeth
tests: fix nil pointer panic on failure (#23053)
This commit is contained in:
parent
97ce6dfa6d
commit
58aeab77d2
@ -74,9 +74,11 @@ func TestState(t *testing.T) {
|
|||||||
t.Run(key+"/snap", func(t *testing.T) {
|
t.Run(key+"/snap", func(t *testing.T) {
|
||||||
withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error {
|
withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error {
|
||||||
snaps, statedb, err := test.Run(subtest, vmconfig, true)
|
snaps, statedb, err := test.Run(subtest, vmconfig, true)
|
||||||
|
if snaps != nil && statedb != nil {
|
||||||
if _, err := snaps.Journal(statedb.IntermediateRoot(false)); err != nil {
|
if _, err := snaps.Journal(statedb.IntermediateRoot(false)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return st.checkFailure(t, err)
|
return st.checkFailure(t, err)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user