From 3e44bf58951ef9bdf890b5c21fc45d92c61c4753 Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Mon, 8 Jan 2024 11:58:46 -0500 Subject: [PATCH] Added more tracing to log computation --- eth/tracers/firehose.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eth/tracers/firehose.go b/eth/tracers/firehose.go index 1a822af362..7e4a4e82b2 100644 --- a/eth/tracers/firehose.go +++ b/eth/tracers/firehose.go @@ -298,12 +298,18 @@ func (f *Firehose) removeLogBlockIndexOnStateRevertedCalls() { } func (f *Firehose) assignOrdinalAndIndexToReceiptLogs() { + firehoseTrace("assigning ordinal and index to logs") + defer func() { + firehoseTrace("assigning ordinal and index to logs terminated") + }() + trx := f.transaction receiptsLogs := trx.Receipt.Logs callLogs := []*pbeth.Log{} for _, call := range trx.Calls { + firehoseTrace("checking call reverted=%t logs=%d", call.StateReverted, len(call.Logs)) if call.StateReverted { continue } @@ -744,6 +750,8 @@ func (f *Firehose) OnLog(l *types.Log) { } activeCall := f.callStack.Peek() + firehoseTrace("adding log to call address=%s call=%d (has already %d logs)", l.Address, activeCall.Index, len(activeCall.Logs)) + activeCall.Logs = append(activeCall.Logs, &pbeth.Log{ Address: l.Address.Bytes(), Topics: topics,