mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(rpc): make TransactionCompat::fill stateful (#11732)
This commit is contained in:
@ -22,7 +22,7 @@ pub struct EthHandlers<Provider, Pool, Network, Events, EthApi: EthApiTypes> {
|
||||
/// Polling based filter handler available on all transports
|
||||
pub filter: EthFilter<Provider, Pool, EthApi>,
|
||||
/// Handler for subscriptions only available for transports that support it (ws, ipc)
|
||||
pub pubsub: EthPubSub<Provider, Pool, Events, Network, EthApi>,
|
||||
pub pubsub: EthPubSub<Provider, Pool, Events, Network, EthApi::TransactionCompat>,
|
||||
}
|
||||
|
||||
impl<Provider, Pool, Network, Events, EthApi> EthHandlers<Provider, Pool, Network, Events, EthApi>
|
||||
@ -94,6 +94,7 @@ where
|
||||
ctx.cache.clone(),
|
||||
ctx.config.filter_config(),
|
||||
Box::new(ctx.executor.clone()),
|
||||
api.tx_resp_builder().clone(),
|
||||
);
|
||||
|
||||
let pubsub = EthPubSub::with_spawner(
|
||||
@ -102,6 +103,7 @@ where
|
||||
ctx.events.clone(),
|
||||
ctx.network.clone(),
|
||||
Box::new(ctx.executor.clone()),
|
||||
api.tx_resp_builder().clone(),
|
||||
);
|
||||
|
||||
Self { api, cache: ctx.cache, filter, pubsub }
|
||||
|
||||
@ -1199,9 +1199,12 @@ where
|
||||
.into_rpc()
|
||||
.into(),
|
||||
RethRpcModule::Web3 => Web3Api::new(self.network.clone()).into_rpc().into(),
|
||||
RethRpcModule::Txpool => {
|
||||
TxPoolApi::<_, EthApi>::new(self.pool.clone()).into_rpc().into()
|
||||
}
|
||||
RethRpcModule::Txpool => TxPoolApi::new(
|
||||
self.pool.clone(),
|
||||
self.eth.api.tx_resp_builder().clone(),
|
||||
)
|
||||
.into_rpc()
|
||||
.into(),
|
||||
RethRpcModule::Rpc => RPCApi::new(
|
||||
namespaces
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user