perf(rpc): use cached block receipts (#2572)

This commit is contained in:
Matthias Seitz
2023-05-05 11:18:14 +02:00
committed by GitHub
parent 52f2bc5ebc
commit b7c46db05d

View File

@@ -570,7 +570,7 @@ where
tx.clone().into_ecrecovered().ok_or(EthApiError::InvalidTransactionSignature)?;
// get all receipts for the block
let all_receipts = match self.client().receipts_by_block((meta.block_number).into())? {
let all_receipts = match self.cache().get_receipts(meta.block_hash).await? {
Some(recpts) => recpts,
None => return Err(EthApiError::UnknownBlockNumber),
};