Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Oct 16, 2024
1 parent 1ec805c commit b2b96a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/state/access_witness.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b2b96a2

Please sign in to comment.