mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
core/state: more consistent naming
This commit is contained in:
parent
21f5a77ece
commit
192e00b043
4 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue