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