Struct ckb_tx_pool::service::TxPoolController[][src]

pub struct TxPoolController { /* fields omitted */ }
Expand description

Controller to the tx-pool service.

The Controller is internally reference-counted and can be freely cloned. A Controller can be obtained when tx-pool service construct.

Implementations

Return whether tx-pool service is started

Return reference of tokio runtime handle

Generate and return block_template

Generate and return block_template with block_assembler_config

Notify new uncle

Make tx-pool consistent after a reorg, by re-adding or recursively erasing detached block transactions from the tx-pool, and also removing any other transactions from the tx-pool that are no longer valid given the new tip/height.

Submit local tx to tx-pool

Submit remote tx with declared cycles and origin to tx-pool

pub fn plug_entry(
    &self,
    entries: Vec<TxEntry>,
    target: PlugTarget
) -> Result<(), AnyError>

Plug tx-pool entry to tx-pool, skip verification. only for test

Receive txs from network, try to add txs to tx-pool

Return tx-pool information

Return fresh proposals

Return tx for rpc

Return txs for network

Return txs with cycles

Clears the tx-pool, removing all txs, update snapshot.

pub fn get_all_entry_info(&self) -> Result<TxPoolEntryInfo, AnyError>

TODO(doc): @zhangsoledad

TODO(doc): @zhangsoledad

Sends suspend chunk process cmd

Sends continue chunk process cmd

Saves tx pool into disk.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

TODO(doc): @quake

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.