diff --git a/eth/backend.go b/eth/backend.go index d8027683707..9b0597c7574 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -275,6 +275,10 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger logger: logger, } + if tracer.Hooks != nil && tracer.Hooks.OnBlockchainInit != nil { + tracer.Hooks.OnBlockchainInit(config.Genesis.Config) + } + var chainConfig *chain.Config var genesis *types.Block if err := backend.chainDB.Update(context.Background(), func(tx kv.RwTx) error { diff --git a/turbo/app/init_cmd.go b/turbo/app/init_cmd.go index 5c1ec2552a5..44f893f5990 100644 --- a/turbo/app/init_cmd.go +++ b/turbo/app/init_cmd.go @@ -71,6 +71,9 @@ func initGenesis(cliCtx *cli.Context) error { var tracingHooks *tracing.Hooks if tracer != nil { tracingHooks = tracer.Hooks + if tracer.Hooks != nil && tracer.Hooks.OnBlockchainInit != nil { + tracer.Hooks.OnBlockchainInit(genesis.Config) + } } _, hash, err := core.CommitGenesisBlock(chaindb, genesis, "", logger, tracingHooks) if err != nil {