Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Oct 22, 2024
1 parent 4694243 commit c329550
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/state/access_witness.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ func (aw *AccessWitness) TouchAndChargeMessageCall(addr []byte, useGasFn UseGasF
}

func (aw *AccessWitness) TouchAndChargeValueTransfer(callerAddr, targetAddr []byte, useGasFn UseGasFn) bool {
_, ok := aw.touchAddressAndChargeGas(callerAddr, zeroTreeIndex, utils.BasicDataLeafKey, true, useGasFn)
chargedGas1, ok := aw.touchAddressAndChargeGas(callerAddr, zeroTreeIndex, utils.BasicDataLeafKey, true, useGasFn)
if !ok {
return false
}
chargedGas, ok := aw.touchAddressAndChargeGas(targetAddr, zeroTreeIndex, utils.BasicDataLeafKey, true, useGasFn)
return ok && (chargedGas > 0 || useGasFn(params.WarmStorageReadCostEIP2929))
chargedGas2, ok := aw.touchAddressAndChargeGas(targetAddr, zeroTreeIndex, utils.BasicDataLeafKey, true, useGasFn)
return ok && (chargedGas1+chargedGas2 > 0 || useGasFn(params.WarmStorageReadCostEIP2929))
}

// TouchAndChargeContractCreateCheck charges access costs before
Expand Down

0 comments on commit c329550

Please sign in to comment.