From ed4349ca904661ae81fadca1f570b959b4be9538 Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Mon, 31 Jul 2023 21:46:51 -0400 Subject: [PATCH] Fixed `BalanceChange` for suicide withdraw not being recorded --- eth/tracers/firehose.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eth/tracers/firehose.go b/eth/tracers/firehose.go index f0d9b540d0..5cd10e7b51 100644 --- a/eth/tracers/firehose.go +++ b/eth/tracers/firehose.go @@ -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