core/vm: fix invalid merkle root caused by PR #627 (#1033)

This commit is contained in:
Daniel Liu 2025-05-14 16:47:53 +08:00 committed by GitHub
parent 96c23408a5
commit 4fabc43a01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {