Struct ethcore_rpc::v1::tests::helpers::TestMinerService [] [src]

pub struct TestMinerService {
    pub imported_transactions: Mutex<Vec<SignedTransaction>>,
    pub latest_closed_block: Mutex<Option<ClosedBlock>>,
    pub pending_transactions: Mutex<HashMap<H256, SignedTransaction>>,
    pub local_transactions: Mutex<BTreeMap<H256, LocalTransactionStatus>>,
    pub pending_receipts: Mutex<BTreeMap<H256, Receipt>>,
    pub last_nonces: RwLock<HashMap<Address, U256>>,
    pub password: RwLock<String>,
    // some fields omitted
}

Test miner service.

Fields

Imported transactions.

Latest closed block.

Pre-existed pending transactions

Pre-existed local transactions

Pre-existed pending receipts

Last nonces.

Password held by Engine.

Trait Implementations

impl Default for TestMinerService
[src]

Returns the "default value" for a type. Read more

impl MinerService for TestMinerService
[src]

Returns miner's status.

Set the author that we will seal blocks as.

Set info necessary to sign consensus messages.

Set the extra_data that we will seal blocks with.

Set the lower gas limit we wish to target when sealing a new block.

Set the upper gas limit we wish to target when sealing a new block.

Set minimal gas price of transaction to be accepted for mining.

Set maximal number of transactions kept in the queue (both current and future).

Set maximum amount of gas allowed for any single transaction to mine.

Get current transactions limit in queue.

Get the author that we will seal blocks as.

Get current minimal gas price for transactions accepted to queue.

Get the extra_data that we will seal blocks with.

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

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

Imports transactions to transaction queue.

Imports transactions to transaction queue.

Returns hashes of transactions currently in pending

Removes all transactions from the queue and restart mining operation.

Called when blocks are imported to chain, updates transactions queue.

New chain head event. Restart mining operation.

Get the sealing work package and if Some, apply some transform.

Query pending transactions for hash.

Get a list of all pending transactions in the queue.

Get a list of local transactions with statuses.

Get a list of all transactions that can go into the given block.

Get a list of all future transactions.

Get a particular reciept.

Get a list of all pending receipts.

Returns highest transaction nonce for given address.

Is it currently sealing?

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.

Latest account balance in pending state.

Call into contract code using pending state.

Get storage value in pending state.

Get account nonce in pending state.

Get contract code in pending state.

Suggested gas price.

Suggested gas limit.