Skip to content

Commit

Permalink
rpc: small refactoring in build_transaction_receipt (paradigmxyz#10269
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tcoratger authored Aug 12, 2024
1 parent d2094d0 commit c9af084
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/rpc/rpc-eth-api/src/helpers/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ pub trait LoadReceipt: EthApiTypes + Send + Sync {
) -> impl Future<Output = Result<AnyTransactionReceipt, Self::Error>> + Send {
async move {
// get all receipts for the block
let all_receipts = match self
let all_receipts = self
.cache()
.get_receipts(meta.block_hash)
.await
.map_err(Self::Error::from_eth_err)?
{
Some(recpts) => recpts,
None => return Err(EthApiError::UnknownBlockNumber.into()),
};
.ok_or_else(|| EthApiError::UnknownBlockNumber)?;

Ok(ReceiptBuilder::new(&tx, meta, &receipt, &all_receipts)?.build())
}
Expand Down

0 comments on commit c9af084

Please sign in to comment.