diff --git a/client/rpc/src/eth/block.rs b/client/rpc/src/eth/block.rs index 4e93f9c816..6c13ca32e1 100644 --- a/client/rpc/src/eth/block.rs +++ b/client/rpc/src/eth/block.rs @@ -88,7 +88,7 @@ where let client = Arc::clone(&self.client); let block_data_cache = Arc::clone(&self.block_data_cache); let backend = Arc::clone(&self.backend); - let graph = Arc::clone(&self.graph); + let pool = Arc::clone(&self.pool); match frontier_backend_client::native_block_id::( client.as_ref(), @@ -143,16 +143,14 @@ where let mut xts: Vec<::Extrinsic> = Vec::new(); // ready validated pool xts.extend( - graph - .ready() + pool.ready() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) .collect::::Extrinsic>>(), ); // future validated pool xts.extend( - graph - .futures() + pool.futures() .iter() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) .collect::::Extrinsic>>(), @@ -194,7 +192,7 @@ where ) -> RpcResult> { if let BlockNumberOrHash::Pending = number_or_hash { // get the pending transactions count - return Ok(Some(U256::from(self.graph.ready().count()))); + return Ok(Some(U256::from(self.pool.ready().count()))); } let block_info = self.block_info_by_number(number_or_hash).await?; diff --git a/client/rpc/src/eth/filter.rs b/client/rpc/src/eth/filter.rs index 75e2b9647a..66411554cc 100644 --- a/client/rpc/src/eth/filter.rs +++ b/client/rpc/src/eth/filter.rs @@ -45,7 +45,7 @@ use crate::{cache::EthBlockDataCacheTask, frontier_backend_client, internal_err} pub struct EthFilter { client: Arc, backend: Arc>, - graph: Arc

, + pool: Arc

, filter_pool: FilterPool, max_stored_filters: usize, max_past_logs: u32, @@ -57,7 +57,7 @@ impl EthFilter { pub fn new( client: Arc, backend: Arc>, - graph: Arc

, + pool: Arc

, filter_pool: FilterPool, max_stored_filters: usize, max_past_logs: u32, @@ -66,7 +66,7 @@ impl EthFilter { Self { client, backend, - graph, + pool, filter_pool, max_stored_filters, max_past_logs, @@ -107,7 +107,7 @@ where let pending_transaction_hashes = if let FilterType::PendingTransaction = filter_type { let txs_ready = self - .graph + .pool .ready() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) .collect(); @@ -220,7 +220,7 @@ where FilterType::PendingTransaction => { let previous_hashes = pool_item.pending_transaction_hashes; let txs_ready = self - .graph + .pool .ready() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) .collect(); diff --git a/client/rpc/src/eth/mod.rs b/client/rpc/src/eth/mod.rs index 358e98354f..0fa6307067 100644 --- a/client/rpc/src/eth/mod.rs +++ b/client/rpc/src/eth/mod.rs @@ -72,7 +72,6 @@ impl EthConfig for () { /// Eth API implementation. pub struct Eth { pool: Arc

, - graph: Arc

, client: Arc, convert_transaction: Option, sync: Arc>, @@ -104,7 +103,6 @@ where pub fn new( client: Arc, pool: Arc

, - graph: Arc

, convert_transaction: Option, sync: Arc>, signers: Vec>, @@ -122,7 +120,6 @@ where Self { client, pool, - graph, convert_transaction, sync, is_authority, @@ -254,7 +251,6 @@ where let Self { client, pool, - graph, convert_transaction, sync, is_authority, @@ -274,7 +270,6 @@ where Eth { client, pool, - graph, convert_transaction, sync, is_authority, diff --git a/client/rpc/src/eth/pending.rs b/client/rpc/src/eth/pending.rs index 94581bd648..1cbde76fc8 100644 --- a/client/rpc/src/eth/pending.rs +++ b/client/rpc/src/eth/pending.rs @@ -121,7 +121,7 @@ where // Get all extrinsics from the ready queue. let extrinsics: Vec<::Extrinsic> = self - .graph + .pool .ready() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) .collect::::Extrinsic>>(); diff --git a/client/rpc/src/eth/submit.rs b/client/rpc/src/eth/submit.rs index a6ca26df4c..8e26a83a1a 100644 --- a/client/rpc/src/eth/submit.rs +++ b/client/rpc/src/eth/submit.rs @@ -179,13 +179,13 @@ where pub async fn pending_transactions(&self) -> RpcResult> { let ready = self - .graph + .pool .ready() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) .collect::>(); let future = self - .graph + .pool .futures() .iter() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) diff --git a/client/rpc/src/eth/transaction.rs b/client/rpc/src/eth/transaction.rs index 722eff1b61..aa7ec0b051 100644 --- a/client/rpc/src/eth/transaction.rs +++ b/client/rpc/src/eth/transaction.rs @@ -49,7 +49,7 @@ where pub async fn transaction_by_hash(&self, hash: H256) -> RpcResult> { let client = Arc::clone(&self.client); let backend = Arc::clone(&self.backend); - let graph = Arc::clone(&self.graph); + let pool = Arc::clone(&self.pool); let (eth_block_hash, index) = match frontier_backend_client::load_transactions::( client.as_ref(), @@ -77,16 +77,14 @@ where let mut xts: Vec<::Extrinsic> = Vec::new(); // Collect transactions in the ready validated pool. xts.extend( - graph - .ready() + pool.ready() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) .collect::::Extrinsic>>(), ); // Collect transactions in the future validated pool. xts.extend( - graph - .futures() + pool.futures() .iter() .map(|in_pool_tx| in_pool_tx.data().as_ref().clone()) .collect::::Extrinsic>>(), diff --git a/template/node/src/rpc/eth.rs b/template/node/src/rpc/eth.rs index d86db4990d..1fbb0db3e3 100644 --- a/template/node/src/rpc/eth.rs +++ b/template/node/src/rpc/eth.rs @@ -30,8 +30,6 @@ pub struct EthDeps { pub client: Arc, /// Transaction pool instance. pub pool: Arc

, - /// Graph pool instance. - pub graph: Arc

, /// Ethereum transaction converter. pub converter: Option, /// The Node authority flag @@ -102,7 +100,6 @@ where let EthDeps { client, pool, - graph, converter, is_authority, enable_dev_signer, @@ -129,7 +126,6 @@ where Eth::::new( client.clone(), pool.clone(), - graph.clone(), converter, sync.clone(), signers, @@ -153,7 +149,7 @@ where EthFilter::new( client.clone(), frontier_backend.clone(), - graph.clone(), + pool.clone(), filter_pool, 500_usize, // max stored filters max_past_logs, @@ -165,7 +161,7 @@ where io.merge( EthPubSub::new( - pool, + pool.clone(), client.clone(), sync, subscription_task_executor, @@ -198,7 +194,7 @@ where )?; #[cfg(feature = "txpool")] - io.merge(TxPool::new(client, graph).into_rpc())?; + io.merge(TxPool::new(client, pool).into_rpc())?; Ok(io) } diff --git a/template/node/src/service.rs b/template/node/src/service.rs index 487a8dd66c..3a28cab4d2 100644 --- a/template/node/src/service.rs +++ b/template/node/src/service.rs @@ -456,7 +456,6 @@ where let eth_deps = crate::rpc::EthDeps { client: client.clone(), pool: pool.clone(), - graph: pool.clone(), converter: Some(TransactionConverter::::default()), is_authority, enable_dev_signer,