From 7a55b9f7882abe14b11132c72f8bfc916c02f0d1 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Thu, 22 Feb 2024 19:53:37 +0800 Subject: [PATCH] core/state: remove unused methods ReturnGas (#23092) --- core/state/state_object.go | 3 --- core/vm/logger_test.go | 1 - eth/tracers/tracer_test.go | 1 - 3 files changed, 5 deletions(-) diff --git a/core/state/state_object.go b/core/state/state_object.go index 53ea774d61..6d50461f15 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -306,9 +306,6 @@ func (self *stateObject) setBalance(amount *big.Int) { } } -// Return the gas back to the origin. Used by the Virtual machine or Closures -func (c *stateObject) ReturnGas(gas *big.Int) {} - func (self *stateObject) deepCopy(db *StateDB, onDirty func(addr common.Address)) *stateObject { stateObject := newObject(db, self.address, self.data, onDirty) if self.trie != nil { diff --git a/core/vm/logger_test.go b/core/vm/logger_test.go index 9ee02b97c0..f6c15d9cbb 100644 --- a/core/vm/logger_test.go +++ b/core/vm/logger_test.go @@ -30,7 +30,6 @@ type dummyContractRef struct { calledForEach bool } -func (dummyContractRef) ReturnGas(*big.Int) {} func (dummyContractRef) Address() common.Address { return common.Address{} } func (dummyContractRef) Value() *big.Int { return new(big.Int) } func (dummyContractRef) SetCode(common.Hash, []byte) {} diff --git a/eth/tracers/tracer_test.go b/eth/tracers/tracer_test.go index a7266c1788..577fd1e576 100644 --- a/eth/tracers/tracer_test.go +++ b/eth/tracers/tracer_test.go @@ -40,7 +40,6 @@ func (account) SetBalance(*big.Int) {} func (account) SetNonce(uint64) {} func (account) Balance() *big.Int { return nil } func (account) Address() common.Address { return common.Address{} } -func (account) ReturnGas(*big.Int) {} func (account) SetCode(common.Hash, []byte) {} func (account) ForEachStorage(cb func(key, value common.Hash) bool) {}