mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
returned error if error object is not nil (#4685)
* returned error if error object is not nil * undefined block: changed it to blockNumber
This commit is contained in:
parent
cfc051892e
commit
8a75033b98
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user