no balance change reason on 0 balance selfdestruct

This commit is contained in:
Sina Mahmoodi 2024-01-16 21:03:16 +03:30
parent 626fee4fed
commit d07264afe0
1 changed files with 1 additions and 1 deletions

View File

@ -485,7 +485,7 @@ func (s *StateDB) SelfDestruct(addr common.Address) {
prev: stateObject.selfDestructed,
prevbalance: prev,
})
if s.logger != nil {
if s.logger != nil && prev.Sign() > 0 {
s.logger.OnBalanceChange(addr, prev, n, BalanceDecreaseSelfdestruct)
}
stateObject.markSelfdestructed()