mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: integrate builder (#6611)
This commit is contained in:
@ -163,8 +163,11 @@ impl BundleStateWithReceipts {
|
||||
/// Returns the receipt root for all recorded receipts.
|
||||
/// Note: this function calculated Bloom filters for every receipt and created merkle trees
|
||||
/// of receipt. This is a expensive operation.
|
||||
#[cfg(not(feature = "optimism"))]
|
||||
#[allow(unused_variables)]
|
||||
pub fn receipts_root_slow(&self, block_number: BlockNumber) -> Option<B256> {
|
||||
#[cfg(feature = "optimism")]
|
||||
panic!("This should not be called in optimism mode. Use `optimism_receipts_root_slow` instead.");
|
||||
#[cfg(not(feature = "optimism"))]
|
||||
self.receipts.root_slow(self.block_number_to_index(block_number)?)
|
||||
}
|
||||
|
||||
@ -172,13 +175,17 @@ impl BundleStateWithReceipts {
|
||||
/// Note: this function calculated Bloom filters for every receipt and created merkle trees
|
||||
/// of receipt. This is a expensive operation.
|
||||
#[cfg(feature = "optimism")]
|
||||
pub fn receipts_root_slow(
|
||||
pub fn optimism_receipts_root_slow(
|
||||
&self,
|
||||
block_number: BlockNumber,
|
||||
chain_spec: &reth_primitives::ChainSpec,
|
||||
timestamp: u64,
|
||||
) -> Option<B256> {
|
||||
self.receipts.root_slow(self.block_number_to_index(block_number)?, chain_spec, timestamp)
|
||||
self.receipts.optimism_root_slow(
|
||||
self.block_number_to_index(block_number)?,
|
||||
chain_spec,
|
||||
timestamp,
|
||||
)
|
||||
}
|
||||
|
||||
/// Returns reference to receipts.
|
||||
|
||||
Reference in New Issue
Block a user