Struct ethcore::client::Client [] [src]

pub struct Client { /* fields omitted */ }

Blockchain database client backed by a persistent database. Owns and manages a blockchain and a block queue. Call import_block() to import a block asynchronously; flush_queue() flushes the queue.

Methods

impl Client
[src]

Create a new client with given spec and DB path and custom verifier.

Adds an actor to be notified on certain events

Returns engine reference.

Get the Registry object - useful for looking up names.

Register an action to be done if a mode change happens.

Flush the block import queue.

This is triggered by a message coming from a block queue when the block is ready for insertion

Import transactions from the IO queue

Get shared miner reference.

Replace io channel. Useful for testing.

Attempt to get a copy of a specific block's final state.

This will not fail if given BlockId::Latest. Otherwise, this can fail (but may not) if the DB prunes state or the block is unknown.

Attempt to get a copy of a specific block's beginning state.

This will not fail if given BlockId::Latest. Otherwise, this can fail (but may not) if the DB prunes state.

Get a copy of the best block's state.

Get info on the cache.

Get the report.

Tick the client.

Take a snapshot at the given block. If the ID given is "latest", this will default to 1000 blocks behind.

Ask the client what the history parameter is.

Trait Implementations

impl DatabaseRestore for Client
[src]

Restart the client with a new backend

impl BlockChainClient for Client
[src]

Makes a non-persistent transaction call.

Estimates how much gas will be necessary for a call.

Replays a given transaction for inspection.

Should be called by any external-facing interface when actively using the client. To minimise chatter, there's no need to call more than once every 30s. Read more

Get the mode.

Disable the client from importing blocks. This cannot be undone in this session and indicates that a subsystem has reason to believe this executable incapable of syncing the chain. Read more

Set the mode.

Get the best block header.

Get raw block header data by block id.

Look up the block number for the given block ID.

Get raw block body data by block id. Block body is an RLP list of two items: uncles and transactions. Read more

Get raw block data by block header hash.

Get block status by block header hash.

Get block total difficulty.

Attempt to get address nonce at given block. May not fail on BlockId::Latest. Read more

Attempt to get address storage root at given block. May not fail on BlockId::Latest. Read more

Get block hash.

Get address code at given block's state.

Get address balance at the given block's state. Read more

Get value of the storage at given position at the given block's state. Read more

Get a list of all accounts in the block id, if fat DB is in operation, otherwise None. If after is set the list starts with the following item. Read more

Get a list of all storage keys in the block id, if fat DB is in operation, otherwise None. If after is set the list starts with the following item. Read more

Get transaction with given hash.

Get the hash of block that contains the transaction, if any.

Get uncle with given id.

Get transaction receipt with given hash.

Get a tree route between from and to. See BlockChain::tree_route. Read more

Get all possible uncle hashes for a block.

Get latest state node

Get raw block receipts data by block header hash.

Import a block into the blockchain.

Import a block with transaction receipts. Does no sealing and transaction validation.

Get block queue information.

Clear block queue and abort all import activity.

Get blockchain information.

Get the registrar address, if it exists.

Returns numbers of blocks containing given bloom.

Returns logs matching given filter.

Returns traces matching given filter.

Returns trace with given id.

Returns traces created by transaction.

Returns traces created by transaction from block.

Get last hashes starting from best block.

Queue transactions for importing.

List all transactions that are allowed into the next block.

Queue conensus engine message.

Get the preferred network ID to sign on

Returns engine-related extra info for BlockId.

Returns engine-related extra info for UncleId.

Returns information about pruning/data availability.

Like call, but with various defaults. Designed to be used for calling contracts.

Import a transaction: used for misbehaviour reporting.

Get the address of the registry itself.

Get the address of a particular blockchain service, if available.

Get address nonce at the latest block's state.

Get address code at the latest block's state.

Get address balance at the latest block's state.

Get value of the storage at given position at the latest block's state.

Sorted list of transaction gas prices from at least last sample_size blocks.

Calculate median gas price from recent blocks if they have any transactions.

Get the gas price distribution based on recent blocks if they have any transactions.

impl MiningBlockChainClient for Client
[src]

Returns latest schedule.

Returns OpenBlock prepared for closing.

Returns EvmFactory.

Broadcast a block proposal.

Import sealed block. Skips all verifications.

impl EngineClient for Client
[src]

Make a new block and seal it.

Submit a seal for a block in the mining queue.

Broadcast a consensus message to the network.

impl MayPanic for Client
[src]

closure will be invoked whenever panic in thread is caught

impl ProvingBlockChainClient for Client
[src]

Prove account storage at a specific block id. Read more

Prove account existence at a specific block id. The key is the keccak hash of the account's address. Returns a vector of raw trie nodes (in order from the root) proving the query. Nodes after from_level may be omitted. An empty vector indicates unservable query. Read more

Get code by address hash.

impl Drop for Client
[src]

A method called when the value goes out of scope. Read more