mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: relax provider bounds (#12857)
This commit is contained in:
@ -42,8 +42,12 @@ where
|
||||
where
|
||||
Provider: ChainSpecProvider + 'static,
|
||||
Tasks: TaskSpawner,
|
||||
Events:
|
||||
CanonStateSubscriptions<Primitives: NodePrimitives<Receipt = reth_primitives::Receipt>>,
|
||||
Events: CanonStateSubscriptions<
|
||||
Primitives: NodePrimitives<
|
||||
Block = reth_primitives::Block,
|
||||
Receipt = reth_primitives::Receipt,
|
||||
>,
|
||||
>,
|
||||
{
|
||||
let fee_history_cache =
|
||||
FeeHistoryCache::new(self.cache.clone(), self.config.fee_history_cache);
|
||||
|
||||
@ -212,7 +212,7 @@ pub async fn fee_history_cache_new_blocks_task<St, Provider, N>(
|
||||
) where
|
||||
St: Stream<Item = CanonStateNotification<N>> + Unpin + 'static,
|
||||
Provider: BlockReaderIdExt + ChainSpecProvider + 'static,
|
||||
N: NodePrimitives<Receipt = reth_primitives::Receipt>,
|
||||
N: NodePrimitives<Block = reth_primitives::Block, Receipt = reth_primitives::Receipt>,
|
||||
{
|
||||
// We're listening for new blocks emitted when the node is in live sync.
|
||||
// If the node transitions to stage sync, we need to fetch the missing blocks
|
||||
@ -249,7 +249,7 @@ pub async fn fee_history_cache_new_blocks_task<St, Provider, N>(
|
||||
break;
|
||||
};
|
||||
|
||||
let committed = event .committed();
|
||||
let committed = event.committed();
|
||||
let (blocks, receipts): (Vec<_>, Vec<_>) = committed
|
||||
.blocks_and_receipts()
|
||||
.map(|(block, receipts)| {
|
||||
|
||||
@ -103,8 +103,12 @@ where
|
||||
) -> Self
|
||||
where
|
||||
Tasks: TaskSpawner + Clone + 'static,
|
||||
Events:
|
||||
CanonStateSubscriptions<Primitives: NodePrimitives<Receipt = reth_primitives::Receipt>>,
|
||||
Events: CanonStateSubscriptions<
|
||||
Primitives: NodePrimitives<
|
||||
Block = reth_primitives::Block,
|
||||
Receipt = reth_primitives::Receipt,
|
||||
>,
|
||||
>,
|
||||
{
|
||||
let blocking_task_pool =
|
||||
BlockingTaskPool::build().expect("failed to build blocking task pool");
|
||||
|
||||
@ -32,7 +32,6 @@ where
|
||||
let block_hash = block.hash();
|
||||
let excess_blob_gas = block.excess_blob_gas;
|
||||
let timestamp = block.timestamp;
|
||||
let block = block.unseal();
|
||||
|
||||
return block
|
||||
.body
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use alloy_eips::eip2718::Encodable2718;
|
||||
use alloy_primitives::TxHash;
|
||||
use alloy_rpc_types_eth::{
|
||||
pubsub::{
|
||||
@ -85,8 +86,13 @@ impl<Provider, Pool, Events, Network, Eth> EthPubSubApiServer<Eth::Transaction>
|
||||
where
|
||||
Provider: BlockReader + EvmEnvProvider + Clone + 'static,
|
||||
Pool: TransactionPool + 'static,
|
||||
Events: CanonStateSubscriptions<Primitives: NodePrimitives<Receipt = reth_primitives::Receipt>>
|
||||
+ Clone
|
||||
Events: CanonStateSubscriptions<
|
||||
Primitives: NodePrimitives<
|
||||
SignedTx: Encodable2718,
|
||||
BlockHeader = reth_primitives::Header,
|
||||
Receipt = reth_primitives::Receipt,
|
||||
>,
|
||||
> + Clone
|
||||
+ 'static,
|
||||
Network: NetworkInfo + Clone + 'static,
|
||||
Eth: TransactionCompat + 'static,
|
||||
@ -120,8 +126,13 @@ async fn handle_accepted<Provider, Pool, Events, Network, Eth>(
|
||||
where
|
||||
Provider: BlockReader + EvmEnvProvider + Clone + 'static,
|
||||
Pool: TransactionPool + 'static,
|
||||
Events: CanonStateSubscriptions<Primitives: NodePrimitives<Receipt = reth_primitives::Receipt>>
|
||||
+ Clone
|
||||
Events: CanonStateSubscriptions<
|
||||
Primitives: NodePrimitives<
|
||||
SignedTx: Encodable2718,
|
||||
BlockHeader = reth_primitives::Header,
|
||||
Receipt = reth_primitives::Receipt,
|
||||
>,
|
||||
> + Clone
|
||||
+ 'static,
|
||||
Network: NetworkInfo + Clone + 'static,
|
||||
Eth: TransactionCompat,
|
||||
@ -338,8 +349,13 @@ where
|
||||
impl<Provider, Pool, Events, Network> EthPubSubInner<Provider, Pool, Events, Network>
|
||||
where
|
||||
Provider: BlockReader + EvmEnvProvider + 'static,
|
||||
Events: CanonStateSubscriptions<Primitives: NodePrimitives<Receipt = reth_primitives::Receipt>>
|
||||
+ 'static,
|
||||
Events: CanonStateSubscriptions<
|
||||
Primitives: NodePrimitives<
|
||||
SignedTx: Encodable2718,
|
||||
BlockHeader = reth_primitives::Header,
|
||||
Receipt = reth_primitives::Receipt,
|
||||
>,
|
||||
> + 'static,
|
||||
Network: NetworkInfo + 'static,
|
||||
Pool: 'static,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user