pub struct TxPoolController { /* private fields */ }
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

Remove tx from tx-pool

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

source

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 tx_status for rpc (get_transaction verbosity = 1)

Return transaction_with_status for rpc (get_transaction verbosity = 2)

Return txs for network

Return txs with cycles

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

source

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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)

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.