From 05354074a4ef44d350e5d0645f622b982679dd6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Duchesneau?= Date: Fri, 27 Jun 2025 15:04:13 -0400 Subject: [PATCH] fix BlockchainConfig.VMConfig.Tracer not being set on eth.New() --- eth/backend.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 8f2b803c86..f7105ab79c 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -221,9 +221,6 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { } } var ( - vmConfig = vm.Config{ - EnablePreimageRecording: config.EnablePreimageRecording, - } options = &core.BlockChainConfig{ TrieCleanLimit: config.TrieCleanCache, NoPrefetch: config.NoPrefetch, @@ -236,7 +233,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { StateScheme: scheme, ChainHistoryMode: config.HistoryMode, TxLookupLimit: int64(min(config.TransactionHistory, math.MaxInt64)), - VmConfig: vmConfig, + VmConfig: vm.Config{ + EnablePreimageRecording: config.EnablePreimageRecording, + }, } ) @@ -249,7 +248,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { if err != nil { return nil, fmt.Errorf("failed to create tracer %s: %v", config.VMTrace, err) } - vmConfig.Tracer = t + options.VmConfig.Tracer = t } // Override the chain config with provided settings. var overrides core.ChainOverrides