Module ethcore::miner [] [src]

Miner module Keeps track of transactions and mined block.

Usage example:

extern crate ethcore_util as util;
extern crate ethcore;
use std::env;
use ethcore::ethereum;
use ethcore::client::{Client, ClientConfig};
use ethcore::miner::{Miner, MinerService};

fn main() {
    let miner: Miner = Miner::with_spec(&ethereum::new_frontier());
    // get status
    assert_eq!(miner.status().transactions_in_pending_queue, 0);

    // Check block for sealing
    //assert!(miner.sealing_block(&*client).lock().is_some());
}

Structs

AccountDetails

Details of account

ExternalMiner

External Miner.

GasPriceCalibratorOptions

Options for the dynamic gas price recalibrator.

Miner

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.

MinerOptions

Configures the behaviour of the miner.

MinerStatus

Mining status

Stratum

Wrapper for dedicated stratum service

StratumOptions

Configures stratum server options.

TransactionQueue

TransactionQueue implementation

Enums

Banning

Transaction queue banning settings.

GasLimit

Type of the gas limit to apply to the transaction queue.

GasPricer

Struct to look after updating the acceptable gas price of a miner.

LocalTransactionStatus

Status of local transaction. Can indicate that the transaction is currently part of the queue (Pending/Future) or gives a reason why the transaction was removed.

PendingSet

Different possible definitions for pending transaction set.

PrioritizationStrategy

Describes the strategy used to prioritize transactions in the queue.

StratumError

Stratum error

TransactionImportResult

Represents the result of importing transaction.

TransactionOrigin

Transaction origin

Traits

ExternalMinerService

External miner interface.

MinerService

Miner client API

NotifyWork

Trait for notifying about new mining work

TransactionQueueDetailsProvider

TransactionQueue transaction details provider.