client/rpc/types/cfx/
tx_pool.rs1use crate::rpc::types::Transaction;
2use cfx_rpc_cfx_types::TransactionStatus;
3use cfx_types::{H256, U256, U64};
4use serde::Serialize;
5
6#[derive(Default, Serialize)]
7pub struct TxWithPoolInfo {
8 pub exist: bool,
9 pub packed: bool,
10 pub local_nonce: U256,
11 pub local_balance: U256,
12 pub state_nonce: U256,
13 pub state_balance: U256,
14 pub local_balance_enough: bool,
15 pub state_balance_enough: bool,
16}
17
18#[derive(Default, Serialize)]
19pub struct TxPoolPendingNonceRange {
20 pub min_nonce: U256,
21 pub max_nonce: U256,
22}
23
24#[derive(Default, Serialize)]
25#[serde(rename_all = "camelCase")]
26pub struct AccountPendingInfo {
27 pub local_nonce: U256,
28 pub pending_count: U256,
29 pub pending_nonce: U256,
30 pub next_pending_tx: H256,
31}
32
33#[derive(Default, Serialize)]
34#[serde(rename_all = "camelCase")]
35pub struct AccountPendingTransactions {
36 pub pending_transactions: Vec<Transaction>,
37 pub first_tx_status: Option<TransactionStatus>,
38 pub pending_count: U64,
39}
40
41#[derive(Default, Serialize)]
42pub struct TxPoolStatus {
43 pub deferred: U64,
44 pub ready: U64,
45 pub received: U64,
46 pub unexecuted: U64,
47}