diff --git a/core/rawdb/bor_receipt.go b/core/rawdb/bor_receipt.go index 5873e1fe1a..98ac6bce45 100644 --- a/core/rawdb/bor_receipt.go +++ b/core/rawdb/bor_receipt.go @@ -43,7 +43,7 @@ func HasBorReceipt(db ethdb.Reader, hash common.Hash, number uint64) bool { return true } -// ReadBorReceiptRLP retrieves all the transaction receipts belonging to a block in RLP encoding. +// ReadBorReceiptRLP retrieves the block receipt belonging to a block in RLP encoding. func ReadBorReceiptRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValue { // First try to look up the data in ancient database. Extra hash // comparison is necessary since ancient database only maintains diff --git a/ethclient/bor_ethclient.go b/ethclient/bor_ethclient.go index dc19fb1795..e785f29d5f 100644 --- a/ethclient/bor_ethclient.go +++ b/ethclient/bor_ethclient.go @@ -21,10 +21,8 @@ func (ec *Client) GetRootHash(ctx context.Context, startBlockNumber uint64, endB func (ec *Client) GetBorBlockReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error) { var r *types.Receipt err := ec.c.CallContext(ctx, &r, "eth_getBorBlockReceipt", hash) - if err == nil { - if r == nil { - return nil, ethereum.NotFound - } + if err == nil && r == nil { + return nil, ethereum.NotFound } return r, err }