cfx_rpc_cfx_types/transaction_status.rs
1use serde::Serialize;
2
3/// Transaction status in the transaction pool.
4#[derive(Serialize, Clone)]
5#[serde(rename_all = "camelCase")]
6pub enum TransactionStatus {
7 Packed,
8 Ready,
9 Pending(PendingReason),
10}
11
12#[derive(Serialize, Clone)]
13#[serde(rename_all = "camelCase")]
14pub enum PendingReason {
15 FutureNonce,
16 NotEnoughCash,
17 OldEpochHeight,
18 // The tx status in the pool is inaccurate due to chain switch or sponsor
19 // balance change. This tx will not be packed even if it should have
20 // been ready, and the user needs to send a new transaction to trigger
21 // the status change.
22 OutdatedStatus,
23}