From b2b96a265eed7ffade9cdfddb22949652eb67374 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Wed, 16 Oct 2024 16:19:16 -0300 Subject: [PATCH] nit Signed-off-by: Ignacio Hagopian --- core/state/access_witness.go | 4 ++-- core/state_transition.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/state/access_witness.go b/core/state/access_witness.go index 0be2f5a3a9d7..24a1344e8e2b 100644 --- a/core/state/access_witness.go +++ b/core/state/access_witness.go @@ -142,8 +142,8 @@ func (aw *AccessWitness) TouchTxOriginAndComputeGas(originAddr []byte) { } } -func (aw *AccessWitness) TouchTxTarget(targetAddr []byte) { - aw.touchAddressAndChargeGas(targetAddr, zeroTreeIndex, utils.BasicDataLeafKey, true, nil) +func (aw *AccessWitness) TouchTxTarget(targetAddr []byte, sendsValue bool) { + aw.touchAddressAndChargeGas(targetAddr, zeroTreeIndex, utils.BasicDataLeafKey, sendsValue, nil) // Note that we do a write-event in CodeHash without distinguishing if the tx target account // exists or not. Pre-7702, there's no situation in which an existing codeHash can be mutated, thus // doing a write-event shouldn't cause an observable difference in gas usage. diff --git a/core/state_transition.go b/core/state_transition.go index 75d5c29573ce..89424cf455fd 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -396,7 +396,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { st.evm.Accesses.TouchTxOriginAndComputeGas(originAddr.Bytes()) if msg.To != nil { - st.evm.Accesses.TouchTxTarget(targetAddr.Bytes()) + st.evm.Accesses.TouchTxTarget(targetAddr.Bytes(), msg.Value.Sign() != 0) // ensure the code size ends up in the access witness st.evm.StateDB.GetCodeSize(*targetAddr)