Trait ethcore::miner::MinerService [] [src]

pub trait MinerService: Send + Sync {
    fn status(&self) -> MinerStatus;
    fn author(&self) -> Address;
    fn set_author(&self, author: Address);
    fn set_engine_signer(&self,
                     address: Address,
                     password: String)
                     -> Result<(), SignError>; fn extra_data(&self) -> Bytes; fn set_extra_data(&self, extra_data: Bytes); fn minimal_gas_price(&self) -> U256; fn set_minimal_gas_price(&self, min_gas_price: U256); fn gas_floor_target(&self) -> U256; fn gas_ceil_target(&self) -> U256; fn set_gas_floor_target(&self, target: U256); fn set_gas_ceil_target(&self, target: U256); fn transactions_limit(&self) -> usize; fn set_transactions_limit(&self, limit: usize); fn set_tx_gas_limit(&self, limit: U256); fn import_external_transactions(&self,
                                chain: &MiningBlockChainClient,
                                transactions: Vec<UnverifiedTransaction>)
                                -> Vec<Result<TransactionImportResult, Error>>; fn import_own_transaction(&self,
                          chain: &MiningBlockChainClient,
                          transaction: PendingTransaction)
                          -> Result<TransactionImportResult, Error>; fn pending_transactions_hashes(&self, best_block: BlockNumber) -> Vec<H256>; fn clear_and_reset(&self, chain: &MiningBlockChainClient); fn chain_new_blocks(&self,
                    chain: &MiningBlockChainClient,
                    imported: &[H256],
                    invalid: &[H256],
                    enacted: &[H256],
                    retracted: &[H256]); fn update_sealing(&self, chain: &MiningBlockChainClient); fn submit_seal(&self,
               chain: &MiningBlockChainClient,
               pow_hash: H256,
               seal: Vec<Bytes>)
               -> Result<(), Error>; fn map_sealing_work<F, T>(&self,
                          chain: &MiningBlockChainClient,
                          f: F)
                          -> Option<T> where F: FnOnce(&ClosedBlock) -> T, Self: Sized; fn transaction(&self,
               best_block: BlockNumber,
               hash: &H256)
               -> Option<SignedTransaction>; fn pending_transactions(&self) -> Vec<PendingTransaction>; fn ready_transactions(&self, best_block: BlockNumber) -> Vec<PendingTransaction>; fn future_transactions(&self) -> Vec<PendingTransaction>; fn local_transactions(&self) -> BTreeMap<H256, LocalTransactionStatus>; fn pending_receipts(&self, best_block: BlockNumber) -> BTreeMap<H256, Receipt>; fn pending_receipt(&self,
                   best_block: BlockNumber,
                   hash: &H256)
                   -> Option<RichReceipt>; fn last_nonce(&self, address: &Address) -> Option<U256>; fn is_sealing(&self) -> bool; fn sensible_gas_price(&self) -> U256; fn balance(&self, chain: &MiningBlockChainClient, address: &Address) -> U256; fn call(&self,
        chain: &MiningBlockChainClient,
        t: &SignedTransaction,
        analytics: CallAnalytics)
        -> Result<Executed, CallError>; fn storage_at(&self,
              chain: &MiningBlockChainClient,
              address: &Address,
              position: &H256)
              -> H256; fn nonce(&self, chain: &MiningBlockChainClient, address: &Address) -> U256; fn code(&self,
        chain: &MiningBlockChainClient,
        address: &Address)
        -> Option<Bytes>; fn sensible_gas_limit(&self) -> U256 { ... } }

Miner client API

Required Methods

Returns miner's status.

Get the author that we will seal blocks as.

Set the author that we will seal blocks as.

Set info necessary to sign consensus messages.

Get the extra_data that we will seal blocks with.

Set the extra_data that we will seal blocks with.

Get current minimal gas price for transactions accepted to queue.

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

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.

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

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

Get current transactions limit in queue.

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.

Imports transactions to transaction queue.

Imports own (node owner) transaction to 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.

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.

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 all transactions that can go into the given block.

Get a list of all future transactions.

Get a list of local transactions with statuses.

Get a list of all pending receipts.

Get a particular reciept.

Returns highest transaction nonce for given address.

Is it currently sealing?

Suggested gas price.

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.

Provided Methods

Suggested gas limit.

Implementors