pub struct Miner { /* private fields */ }
Expand description

Keeps track of transactions using priority queue and holds currently mined block. Handles preparing work for “work sealing” or seals “internally” if Engine does not require work.

Implementations

Push listener that will handle new jobs

Set a callback to be notified about imported transactions’ hashes.

Creates new instance of miner Arc.

Creates new instance of miner with given spec and accounts.

NOTE This should be only used for tests.

Creates new instance of miner with given spec and accounts.

NOTE This should be only used for tests.

Sets IoChannel

Sets in-blockchain checker for transactions.

Clear all pending block states

Updates transaction queue verification limits.

Limits consist of current block gas limit and minimal gas price.

Returns ServiceTransactionChecker

Trait Implementations

Prepare the block and work if the Engine does not seal internally.

Type representing chain state

Get current authoring parameters.

Set the lower and upper bound of gas limit we wish to target when sealing a new block.

Set the extra_data that we will seal blocks with.

Set info necessary to sign consensus messages and block authoring. Read more

Suggested gas price.

Suggested max priority fee gas price

Suggested gas limit.

Set a new minimum gas limit. Will not work if dynamic gas calibration is set. Read more

Imports transactions to transaction queue.

Imports own (node owner) transaction to queue.

Imports transactions from potentially external sources, with behaviour determined by the config flag tx_queue_allow_unfamiliar_locals Read more

Get a list of local transactions with statuses.

Get a list of all transactions in the pool (some of them might not be ready for inclusion yet).

Get a list of all transaction hashes in the pool (some of them might not be ready for inclusion yet).

Get a set of all pending transaction hashes. Read more

Get a list of all ready transactions either ordered by priority or unordered (cheaper), and optionally filtered by sender, recipient, gas, gas price, value and/or nonce. Read more

Returns next valid nonce for given address. Read more

Query transaction from the pool given it’s hash.

Removes transaction from the pool. Read more

Get current queue status. Read more

Get a list of all pending receipts from pending block.

Is it currently sealing?

Get the sealing work package preparing it if doesn’t exist yet. Read more

Submit seal as a valid solution for the header of pow_hash. Will check the seal, but not actually insert the block into the chain. Read more

Called when blocks are imported to chain, updates transactions queue. is_internal_import indicates that the block has just been created in miner and internally sealed by the engine, so we shouldn’t attempt creating new block again. Read more

Get Some clone() of the current pending block’s state or None if we’re not sealing.

Get Some clone() of the current pending block header or None if we’re not sealing.

Get Some clone() of the current pending block or None if we’re not sealing.

Get Some clone() of the current pending block transactions or None if we’re not sealing.

Get a particular receipt from pending block.

Get an unfiltered list of all ready transactions.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

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.

Should always be Self

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.