Skip to content

Commit

Permalink
fix: erigon_getLatestLogs (erigontech#7450)
Browse files Browse the repository at this point in the history
When calling erigon_getLatestLogs, I was getting a crash in
[erigon_receipts.go](https://github.com/ledgerwatch/erigon/blob/beb97784d43ece5acde365a74efe8763692ebdba/cmd/rpcdaemon/commands/erigon_receipts.go#L254).
I think it is a simple indexing bug

```
[service.go:217 panic.go:884 panic.go:113 erigon_receipts.go:254 value.go:586 value.go:370 service.go:222 
handler.go:494 handler.go:444 handler.go:392 handler.go:223 handler.go:316 asm_amd64.s:1598]
[WARN] [05-05|21:13:59.749] Served                                   
conn=100.70.204.111:50141 method=erigon_getLatestLogs reqid=1 t=621.5936ms err="method handler crashed"
```
  • Loading branch information
nettijoe96 authored and calmbeing committed Jul 12, 2023
1 parent 9c3e1ed commit b9d4c51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/erigon_receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (api *ErigonImpl) GetLatestLogs(ctx context.Context, crit filters.FilterCri
}
topicsMap := make(map[common.Hash]struct{})
for i := range crit.Topics {
for j := range crit.Topics {
for j := range crit.Topics[i] {
topicsMap[crit.Topics[i][j]] = struct{}{}
}
}
Expand Down

0 comments on commit b9d4c51

Please sign in to comment.