mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
core/state: always emit self-destruct hook even for zero balance
This commit is contained in:
parent
16f50285b7
commit
394acc1ca4
1 changed files with 2 additions and 2 deletions
|
|
@ -227,7 +227,7 @@ func (s *hookedStateDB) SelfDestruct(address common.Address) uint256.Int {
|
||||||
|
|
||||||
prev := s.inner.SelfDestruct(address)
|
prev := s.inner.SelfDestruct(address)
|
||||||
|
|
||||||
if s.hooks.OnBalanceChange != nil && !prev.IsZero() {
|
if s.hooks.OnBalanceChange != nil {
|
||||||
s.hooks.OnBalanceChange(address, prev.ToBig(), new(big.Int), tracing.BalanceDecreaseSelfdestruct)
|
s.hooks.OnBalanceChange(address, prev.ToBig(), new(big.Int), tracing.BalanceDecreaseSelfdestruct)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -253,7 +253,7 @@ func (s *hookedStateDB) SelfDestruct6780(address common.Address) (uint256.Int, b
|
||||||
|
|
||||||
prev, changed := s.inner.SelfDestruct6780(address)
|
prev, changed := s.inner.SelfDestruct6780(address)
|
||||||
|
|
||||||
if s.hooks.OnBalanceChange != nil && !prev.IsZero() {
|
if s.hooks.OnBalanceChange != nil {
|
||||||
s.hooks.OnBalanceChange(address, prev.ToBig(), new(big.Int), tracing.BalanceDecreaseSelfdestruct)
|
s.hooks.OnBalanceChange(address, prev.ToBig(), new(big.Int), tracing.BalanceDecreaseSelfdestruct)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue