tests: cleanup snapshot generator goroutine leak
This commit is contained in:
@ -79,7 +79,15 @@ type vmExecMarshaling struct {
|
||||
}
|
||||
|
||||
func (t *VMTest) Run(vmconfig vm.Config, snapshotter bool) error {
|
||||
statedb := MakePreState(rawdb.NewMemoryDatabase(), t.json.Pre, snapshotter)
|
||||
snaps, statedb := MakePreState(rawdb.NewMemoryDatabase(), t.json.Pre, snapshotter)
|
||||
if snapshotter {
|
||||
preRoot := statedb.IntermediateRoot(false)
|
||||
defer func() {
|
||||
if _, err := snaps.Journal(preRoot); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
ret, gasRemaining, err := t.exec(statedb, vmconfig)
|
||||
|
||||
if t.json.GasRemaining == nil {
|
||||
|
Reference in New Issue
Block a user