Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulated backend and genesis to kv #2104

Merged
merged 16 commits into from
Jun 5, 2021
Prev Previous commit
Next Next commit
merge
  • Loading branch information
AskAlexSharov committed Jun 5, 2021
commit 380126e0be638457a4b3812861147318ad145897
14 changes: 2 additions & 12 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,7 @@ func NewSimulatedBackendWithDatabase(database ethdb.RwKV, alloc core.GenesisAllo
},
config: genesis.Config,
}
if err := database.View(context.Background(), func(tx ethdb.Tx) error {
backend.checkTEVM = ethdb.GetCheckTEVM(tx)
return nil
}); err != nil {
panic(err)
}
backend.checkTEVM = ethdb.GetCheckTEVM(ethdb.NewObjectDatabase(database))
backend.events = filters.NewEventSystem(&filterBackend{database, backend})
backend.emptyPendingBlock()
return backend
Expand Down Expand Up @@ -144,12 +139,7 @@ func NewSimulatedBackendWithConfig(alloc core.GenesisAlloc, config *params.Chain
return h
},
}
if err := database.View(context.Background(), func(tx ethdb.Tx) error {
backend.checkTEVM = ethdb.GetCheckTEVM(tx)
return nil
}); err != nil {
panic(err)
}
backend.checkTEVM = ethdb.GetCheckTEVM(ethdb.NewObjectDatabase(database))
backend.events = filters.NewEventSystem(&filterBackend{database, backend})
backend.emptyPendingBlock()
return backend
Expand Down