Fixed BalanceChange for suicide withdraw not being recorded

This commit is contained in:
Matthieu Vachon 2023-07-31 21:46:51 -04:00
parent 2b4614152b
commit ed4349ca90

View file

@ -304,6 +304,10 @@ func (f *Firehose) CaptureEnter(typ vm.OpCode, from common.Address, to common.Ad
f.ensureInCall()
f.callStack.Peek().Suicide = true
if value.Sign() != 0 {
f.OnBalanceChange(from, value, common.Big0, state.BalanceChangeSuicideWithdraw)
}
// The next CaptureExit must be ignored, this variable will make the next CaptureExit to be ignored
f.latestCallStartSuicided = true
return