Skip to content

Commit

Permalink
The TxIndex starts from 1, so we need to decrease by 1 by one so it l…
Browse files Browse the repository at this point in the history
…ater matches the index of the transaction in the array
  • Loading branch information
marino39 committed Aug 11, 2023
1 parent c23977d commit a44bb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethreceipts/ethreceipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ func groupLogsByTransaction(logs []types.Log, numTxns int) [][]*types.Log {
out := make([][]*types.Log, blockLogsCount(numTxns, logs))
for _, log := range logs {
log := log
out[log.TxIndex] = append(out[log.TxIndex], &log)
out[log.TxIndex-1] = append(out[log.TxIndex-1], &log)
}
for i, logs := range out {
if logs == nil {
Expand Down

0 comments on commit a44bb3f

Please sign in to comment.