diff --git a/cmd/rpcdaemon/commands/eth_receipts.go b/cmd/rpcdaemon/commands/eth_receipts.go index d418dce43..ca43379f2 100644 --- a/cmd/rpcdaemon/commands/eth_receipts.go +++ b/cmd/rpcdaemon/commands/eth_receipts.go @@ -193,7 +193,10 @@ func (api *APIImpl) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([ } body, err := api._blockReader.BodyWithTransactions(ctx, tx, blockHash, blockNumber) - if err != nil || body == nil { + if err != nil { + return nil, err + } + if body == nil { return nil, fmt.Errorf("block not found %d", blockNumber) } for _, log := range blockLogs { @@ -203,7 +206,7 @@ func (api *APIImpl) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([ } logs = append(logs, blockLogs...) - borLogs := rawdb.ReadBorReceiptLogs(tx, blockHash, block, txIndex+1, logIndex) + borLogs := rawdb.ReadBorReceiptLogs(tx, blockHash, blockNumber, txIndex+1, logIndex) if borLogs != nil { borLogs = filterLogs(borLogs, crit.Addresses, crit.Topics) if len(borLogs) > 0 {