Skip to content

Commit 923963d

Browse files
committed
core/state/accesswitness: remove unused withValue parameter
Signed-off-by: Ignacio Hagopian <[email protected]>
1 parent 4475d8f commit 923963d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/state/access_witness.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (aw *AccessWitness) TouchAndChargeContractCreateInit(addr []byte, createSen
128128
// TouchAndChargeContractCreateCompleted charges access access costs after
129129
// the completion of a contract creation to populate the created account in
130130
// the tree
131-
func (aw *AccessWitness) TouchAndChargeContractCreateCompleted(addr []byte, withValue bool) uint64 { // TODO(jsign): withValue not used?
131+
func (aw *AccessWitness) TouchAndChargeContractCreateCompleted(addr []byte) uint64 {
132132
var gas uint64
133133
gas += aw.TouchAddressOnWriteAndComputeGas(addr, zeroTreeIndex, utils.VersionLeafKey)
134134
gas += aw.TouchAddressOnWriteAndComputeGas(addr, zeroTreeIndex, utils.BalanceLeafKey)

core/vm/evm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
530530
}
531531

532532
if err == nil && evm.chainRules.IsVerkle {
533-
if !contract.UseGas(evm.Accesses.TouchAndChargeContractCreateCompleted(address.Bytes()[:], value.Sign() != 0)) {
533+
if !contract.UseGas(evm.Accesses.TouchAndChargeContractCreateCompleted(address.Bytes()[:])) {
534534
evm.StateDB.RevertToSnapshot(snapshot)
535535
err = ErrOutOfGas
536536
}

0 commit comments

Comments
 (0)