Trait fc_rpc_core::TxPoolApiServer
source · pub trait TxPoolApiServer: Sized + Send + Sync + 'static {
// Required methods
fn content(&self) -> RpcResult<TxPoolResult<TransactionMap<Transaction>>>;
fn inspect(&self) -> RpcResult<TxPoolResult<TransactionMap<Summary>>>;
fn status(&self) -> RpcResult<TxPoolResult<U256>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the TxPoolApi
RPC API.
Required Methods§
sourcefn content(&self) -> RpcResult<TxPoolResult<TransactionMap<Transaction>>>
fn content(&self) -> RpcResult<TxPoolResult<TransactionMap<Transaction>>>
The content inspection property can be queried to list the exact details of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
The result is an object with two fields pending and queued. Each of these fields are associative arrays, in which each entry maps an origin-address to a batch of scheduled transactions. These batches themselves are maps associating nonces with actual transactions.
For details, see txpool_content (geth) or txpool_content (nethermind).
sourcefn inspect(&self) -> RpcResult<TxPoolResult<TransactionMap<Summary>>>
fn inspect(&self) -> RpcResult<TxPoolResult<TransactionMap<Summary>>>
The inspect inspection property can be queried to list a textual summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. This is a method specifically tailored to developers to quickly see the transactions in the pool and find any potential issues.
The result is an object with two fields pending and queued. Each of these fields are associative arrays, in which each entry maps an origin-address to a batch of scheduled transactions. These batches themselves are maps associating nonces with transactions summary strings.
For details, see txpool_inspect (geth) or txpool_inspect (nethermind).
sourcefn status(&self) -> RpcResult<TxPoolResult<U256>>
fn status(&self) -> RpcResult<TxPoolResult<U256>>
The status inspection property can be queried for the number of transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
The result is an object with two fields pending and queued, each of which is a counter representing the number of transactions in that particular state.
For details, see txpool_status (geth) or txpool_status (nethermind).