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