mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-13 15:33:47 +00:00
Removed tracer support when doing genesis.Flush(...)
The genesis flush do set the logger, but we receive the genesis block allocs via `OnGenesisBlock` meaning it's not necessary to have the logger in the flush.
This commit is contained in:
parent
d0dbbaf6a5
commit
5763314b0d
2 changed files with 8 additions and 2 deletions
|
|
@ -145,7 +145,6 @@ func (ga *GenesisAlloc) deriveHash() (common.Hash, error) {
|
||||||
// Also, the genesis state specification will be flushed as well.
|
// Also, the genesis state specification will be flushed as well.
|
||||||
func (ga *GenesisAlloc) flush(db ethdb.Database, triedb *trie.Database, blockhash common.Hash, bcLogger BlockchainLogger) error {
|
func (ga *GenesisAlloc) flush(db ethdb.Database, triedb *trie.Database, blockhash common.Hash, bcLogger BlockchainLogger) error {
|
||||||
statedb, err := state.New(types.EmptyRootHash, state.NewDatabaseWithNodeDB(db, triedb), nil)
|
statedb, err := state.New(types.EmptyRootHash, state.NewDatabaseWithNodeDB(db, triedb), nil)
|
||||||
statedb.SetLogger(bcLogger)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -732,7 +732,14 @@ func (f *Firehose) OnLog(l *types.Log) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Firehose) OnNewAccount(a common.Address) {
|
func (f *Firehose) OnNewAccount(a common.Address) {
|
||||||
f.ensureInBlockAndInTrxAndInCall()
|
f.ensureInBlockOrTrx()
|
||||||
|
if f.transaction == nil {
|
||||||
|
// We receive OnNewAccount on finalization of the block which means there is no
|
||||||
|
// transaction active. In that case, we do not track the account creation because
|
||||||
|
// the "old" Firehose didn't but mainly because we don't have `AccountCreation` at
|
||||||
|
// the block level so what can we do...
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if f.isPrecompiledAddr(a) {
|
if f.isPrecompiledAddr(a) {
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue