core/state: more consistent naming

This commit is contained in:
Martin Holst Swende 2024-10-22 21:04:23 +02:00
parent 21f5a77ece
commit 192e00b043
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
4 changed files with 5 additions and 5 deletions

View file

@ -503,7 +503,7 @@ func (s *StateDB) SelfDestruct(addr common.Address) uint256.Int {
return prevBalance
}
func (s *StateDB) Selfdestruct6780(addr common.Address) (uint256.Int, bool) {
func (s *StateDB) SelfDestruct6780(addr common.Address) (uint256.Int, bool) {
stateObject := s.getStateObject(addr)
if stateObject == nil {
return uint256.Int{}, false

View file

@ -207,8 +207,8 @@ func (s *hookedStateDB) SelfDestruct(address common.Address) uint256.Int {
return prev
}
func (s *hookedStateDB) Selfdestruct6780(address common.Address) (uint256.Int, bool) {
prev, changed := s.inner.Selfdestruct6780(address)
func (s *hookedStateDB) SelfDestruct6780(address common.Address) (uint256.Int, bool) {
prev, changed := s.inner.SelfDestruct6780(address)
if !prev.IsZero() && changed {
if s.hooks.OnBalanceChange != nil {
s.hooks.OnBalanceChange(address, prev.ToBig(), new(big.Int), tracing.BalanceDecreaseSelfdestruct)

View file

@ -919,7 +919,7 @@ func opSelfdestruct6780(pc *uint64, interpreter *EVMInterpreter, scope *ScopeCon
balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address())
interpreter.evm.StateDB.SubBalance(scope.Contract.Address(), balance, tracing.BalanceDecreaseSelfdestruct)
interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance, tracing.BalanceIncreaseSelfdestruct)
interpreter.evm.StateDB.Selfdestruct6780(scope.Contract.Address())
interpreter.evm.StateDB.SelfDestruct6780(scope.Contract.Address())
if tracer := interpreter.evm.Config.Tracer; tracer != nil {
if tracer.OnEnter != nil {
tracer.OnEnter(interpreter.evm.depth, byte(SELFDESTRUCT), scope.Contract.Address(), beneficiary.Bytes20(), []byte{}, 0, balance.ToBig())

View file

@ -60,7 +60,7 @@ type StateDB interface {
SelfDestruct(common.Address) uint256.Int
HasSelfDestructed(common.Address) bool
Selfdestruct6780(common.Address) (uint256.Int, bool)
SelfDestruct6780(common.Address) (uint256.Int, bool)
// Exist reports whether the given account exists in state.
// Notably this should also return true for self-destructed accounts.