From 4fabc43a011704cc75f560d00e2ca8a661f1d09b Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Wed, 14 May 2025 16:47:53 +0800 Subject: [PATCH] core/vm: fix invalid merkle root caused by PR #627 (#1033) --- core/vm/evm.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/vm/evm.go b/core/vm/evm.go index 8f432e2bf0..e5461e7b8e 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -366,7 +366,9 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte // This doesn't matter on Mainnet, where all empties are gone at the time of Byzantium, // but is the correct thing to do and matters on other networks, in tests, and potential // future scenarios - evm.StateDB.AddBalance(addr, big0) + if evm.ChainConfig().IsTIPXDCXCancellationFee(evm.Context.BlockNumber) { + evm.StateDB.AddBalance(addr, big0) + } // Invoke tracer hooks that signal entering/exiting a call frame if evm.Config.Tracer != nil {