Struct ckb_types::core::tx_pool::TransactionWithStatus
source · pub struct TransactionWithStatus {
pub transaction: Option<TransactionView>,
pub tx_status: TxStatus,
pub cycles: Option<Cycle>,
pub fee: Option<Capacity>,
pub min_replace_fee: Option<Capacity>,
pub time_added_to_pool: Option<u64>,
}
Expand description
The JSON view of a transaction as well as its status.
Fields§
§transaction: Option<TransactionView>
The transaction.
tx_status: TxStatus
The transaction status.
cycles: Option<Cycle>
The transaction verification consumed cycles
fee: Option<Capacity>
The transaction fee of the transaction
min_replace_fee: Option<Capacity>
The minimal fee required to replace this transaction
time_added_to_pool: Option<u64>
If the transaction is in tx-pool, time_added_to_pool
represent when it enters the tx-pool. unit: Millisecond
Implementations§
source§impl TransactionWithStatus
impl TransactionWithStatus
sourcepub fn with_status(
tx: Option<TransactionView>,
cycles: Cycle,
time_added_to_pool: u64,
tx_status: TxStatus,
fee: Option<Capacity>,
min_replace_fee: Option<Capacity>
) -> Self
pub fn with_status( tx: Option<TransactionView>, cycles: Cycle, time_added_to_pool: u64, tx_status: TxStatus, fee: Option<Capacity>, min_replace_fee: Option<Capacity> ) -> Self
Build with tx status
sourcepub fn with_committed(
tx: Option<TransactionView>,
hash: H256,
cycles: Option<Cycle>,
fee: Option<Capacity>
) -> Self
pub fn with_committed( tx: Option<TransactionView>, hash: H256, cycles: Option<Cycle>, fee: Option<Capacity> ) -> Self
Build with committed status
sourcepub fn with_rejected(reason: String) -> Self
pub fn with_rejected(reason: String) -> Self
Build with rejected status
sourcepub fn with_unknown() -> Self
pub fn with_unknown() -> Self
Build with rejected status
sourcepub fn omit_transaction(tx_status: TxStatus, cycles: Option<Cycle>) -> Self
pub fn omit_transaction(tx_status: TxStatus, cycles: Option<Cycle>) -> Self
Omit transaction
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if the tx_status is Unknown.
Trait Implementations§
source§impl Clone for TransactionWithStatus
impl Clone for TransactionWithStatus
source§fn clone(&self) -> TransactionWithStatus
fn clone(&self) -> TransactionWithStatus
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for TransactionWithStatus
impl Send for TransactionWithStatus
impl Sync for TransactionWithStatus
impl Unpin for TransactionWithStatus
impl UnwindSafe for TransactionWithStatus
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more