Struct vapcore::miner::Miner[][src]

pub struct Miner { /* fields omitted */ }

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

impl Miner[src]

pub fn pending_transactions_receiver(&self) -> UnboundedReceiver<Arc<Vec<H256>>>[src]

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

pub fn full_transactions_receiver(
    &self
) -> UnboundedReceiver<Arc<Vec<(H256, TxStatus)>>>
[src]

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

pub fn new<A: LocalAccounts + 'static>(
    options: MinerOptions,
    gas_pricer: GasPricer,
    spec: &Spec,
    accounts: A
) -> Self
[src]

Creates new instance of miner Arc.

pub fn new_for_tests(spec: &Spec, accounts: Option<HashSet<Address>>) -> Miner[src]

Creates new instance of miner with given spec and accounts.

NOTE This should be only used for tests.

pub fn new_for_tests_force_sealing(
    spec: &Spec,
    accounts: Option<HashSet<Address>>,
    force_sealing: bool
) -> Miner
[src]

Creates new instance of miner with given spec and accounts.

NOTE This should be only used for tests.

pub fn set_io_channel(&self, io_channel: IoChannel<ClientIoMessage<Client>>)[src]

Sets IoChannel

pub fn set_in_chain_checker<C>(&self, chain: &Arc<C>) where
    C: TransactionInfo + Send + Sync + 'static, 
[src]

Sets in-blockchain checker for transactions.

pub fn clear(&self)[src]

Clear all pending block states

pub fn update_transaction_queue_limits(&self, block_gas_limit: U256)[src]

Updates transaction queue verification limits.

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

pub fn service_transaction_checker(&self) -> Option<ServiceTransactionChecker>[src]

Returns ServiceTransactionChecker

Trait Implementations

impl MinerService for Miner[src]

type State = State<StateDB>

Type representing chain state

fn update_sealing<C>(&self, chain: &C, force: ForceUpdateSealing) where
    C: BlockChain + CallContract + BlockProducer + SealedBlockImporter + Nonce + Sync
[src]

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

Auto Trait Implementations

impl !RefUnwindSafe for Miner

impl Send for Miner

impl Sync for Miner

impl Unpin for Miner

impl !UnwindSafe for Miner

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,