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 parameters. The database is assumed to have been initialized with the correct columns.

Wakes up client if it's a sleep.

Adds an actor to be notified on certain events

Set a closure to call when the client wants to be restarted.

The parameter passed to the callback is the name of the new chain spec to use after the restart.

Returns engine reference.

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

Flush the block import queue.

The env info as of the best block.

The env info as of a given block. returns None if the block unknown.

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

Replace io channel. Useful for testing.

Get a copy of the best block's state.

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.

Important traits for Box<R>

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 Nonce for Client
[src]

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

Get address nonce at the latest block's state.

impl Balance for Client
[src]

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

Get address balance at the latest block's state.

impl AccountData for Client
[src]

impl ChainInfo for Client
[src]

Get blockchain information.

impl BlockInfo for Client
[src]

Get raw block header data by block id.

Get the best block header.

Get raw block data by block header hash.

Get address code hash at given block's state.

impl TransactionInfo for Client
[src]

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

impl BlockChainTrait for Client
[src]

impl RegistryInfo for Client
[src]

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

impl CallContract for Client
[src]

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

impl ImportBlock for Client
[src]

Import a block into the blockchain.

impl StateClient for Client
[src]

Type representing chain state

Get a copy of the best block's state.

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

impl Call for Client
[src]

Type representing chain state

Makes a non-persistent transaction call.

Makes multiple non-persistent but dependent transaction calls. Returns a vector of successes or a failure if any of the transaction fails. Read more

Estimates how much gas will be necessary for a call.

impl EngineInfo for Client
[src]

Get underlying engine object

impl BlockChainClient for Client
[src]

Replays a given transaction for inspection.

Replays all the transactions in a given block for inspection.

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 chain spec name.

Set the chain via a spec name.

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 block status by block header hash.

Get block total difficulty.

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 code hash at given block's state. 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 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.

Get block queue information.

Clear block queue and abort all import activity.

Get the registrar address, if it exists.

Important traits for Vec<u8>

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.

Important traits for Vec<u8>

List all transactions that are allowed into the next block.

Get the preferred chain ID to sign on

Returns engine-related extra info for BlockId.

Returns engine-related extra info for UncleId.

Returns information about pruning/data availability.

Schedule state-altering transaction to be executed on the next pending block.

Get the address of the registry itself.

Get the EIP-86 transition block number.

Get address code 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.

impl IoClient for Client
[src]

Queue transactions for importing.

Queue block import with transaction receipts. Does no sealing and transaction validation.

Queue conensus engine message.

impl ReopenBlock for Client
[src]

Reopens an OpenBlock and updates uncles.

impl PrepareOpenBlock for Client
[src]

Returns OpenBlock prepared for closing.

impl BlockProducer for Client
[src]

impl ScheduleInfo for Client
[src]

Returns latest schedule.

impl ImportSealedBlock for Client
[src]

Import sealed block. Skips all verifications.

impl BroadcastProposalBlock for Client
[src]

Broadcast a block proposal.

impl SealedBlockImporter for Client
[src]

impl TransactionVerifierClient for Client
[src]

impl BlockChainClient for Client
[src]

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.

Get the transition to the epoch the given parent hash is part of or transitions to. This will give the epoch that any children of this parent belong to. Read more

Attempt to cast the engine client to a full client.

Get a block number by ID.

Get raw block header data by block id.

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. Read more

Prove execution of a transaction at the given block. Returns the output of the call and a vector of database items necessary to reproduce it. Read more

Get an epoch change signal by block hash.

impl Drop for Client
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl Send for Client

impl Sync for Client