mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
feat: add pending receipts (#3320)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use crate::{blockchain_tree::error::InsertBlockError, Error};
|
||||
use reth_primitives::{
|
||||
BlockHash, BlockNumHash, BlockNumber, SealedBlock, SealedBlockWithSenders, SealedHeader,
|
||||
BlockHash, BlockNumHash, BlockNumber, Receipt, SealedBlock, SealedBlockWithSenders,
|
||||
SealedHeader,
|
||||
};
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
|
||||
@@ -215,6 +216,14 @@ pub trait BlockchainTreeViewer: Send + Sync {
|
||||
self.block_by_hash(self.pending_block_num_hash()?.hash)
|
||||
}
|
||||
|
||||
/// Returns the pending receipts if there is one.
|
||||
fn pending_receipts(&self) -> Option<Vec<Receipt>> {
|
||||
self.receipts_by_block_hash(self.pending_block_num_hash()?.hash)
|
||||
}
|
||||
|
||||
/// Returns the pending receipts if there is one.
|
||||
fn receipts_by_block_hash(&self, block_hash: BlockHash) -> Option<Vec<Receipt>>;
|
||||
|
||||
/// Returns the pending block if there is one.
|
||||
fn pending_header(&self) -> Option<SealedHeader> {
|
||||
self.header_by_hash(self.pending_block_num_hash()?.hash)
|
||||
|
||||
Reference in New Issue
Block a user