mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-13 15:33:47 +00:00
Added more tracing to log computation
This commit is contained in:
parent
3181acac69
commit
3e44bf5895
1 changed files with 8 additions and 0 deletions
|
|
@ -298,12 +298,18 @@ func (f *Firehose) removeLogBlockIndexOnStateRevertedCalls() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Firehose) assignOrdinalAndIndexToReceiptLogs() {
|
func (f *Firehose) assignOrdinalAndIndexToReceiptLogs() {
|
||||||
|
firehoseTrace("assigning ordinal and index to logs")
|
||||||
|
defer func() {
|
||||||
|
firehoseTrace("assigning ordinal and index to logs terminated")
|
||||||
|
}()
|
||||||
|
|
||||||
trx := f.transaction
|
trx := f.transaction
|
||||||
|
|
||||||
receiptsLogs := trx.Receipt.Logs
|
receiptsLogs := trx.Receipt.Logs
|
||||||
|
|
||||||
callLogs := []*pbeth.Log{}
|
callLogs := []*pbeth.Log{}
|
||||||
for _, call := range trx.Calls {
|
for _, call := range trx.Calls {
|
||||||
|
firehoseTrace("checking call reverted=%t logs=%d", call.StateReverted, len(call.Logs))
|
||||||
if call.StateReverted {
|
if call.StateReverted {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
@ -744,6 +750,8 @@ func (f *Firehose) OnLog(l *types.Log) {
|
||||||
}
|
}
|
||||||
|
|
||||||
activeCall := f.callStack.Peek()
|
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{
|
activeCall.Logs = append(activeCall.Logs, &pbeth.Log{
|
||||||
Address: l.Address.Bytes(),
|
Address: l.Address.Bytes(),
|
||||||
Topics: topics,
|
Topics: topics,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue