mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-13 23:43:47 +00:00
fix self destruct burn condition
This commit is contained in:
parent
3078dfe80b
commit
6c44a594f4
1 changed files with 1 additions and 1 deletions
|
|
@ -881,7 +881,7 @@ func (s *StateDB) Finalise(deleteEmptyObjects bool) {
|
||||||
obj.deleted = true
|
obj.deleted = true
|
||||||
|
|
||||||
// If ether was sent to account post-selfdestruct it is burnt.
|
// If ether was sent to account post-selfdestruct it is burnt.
|
||||||
if bal := obj.Balance(); bal.Sign() != 0 && s.logger != nil {
|
if bal := obj.Balance(); s.logger != nil && obj.selfDestructed && bal.Sign() != 0 {
|
||||||
s.logger.OnBalanceChange(obj.address, bal.ToBig(), new(big.Int), BalanceDecreaseSelfdestructBurn)
|
s.logger.OnBalanceChange(obj.address, bal.ToBig(), new(big.Int), BalanceDecreaseSelfdestructBurn)
|
||||||
}
|
}
|
||||||
// We need to maintain account deletions explicitly (will remain
|
// We need to maintain account deletions explicitly (will remain
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue