Struct ethcore::client::TestBlockChainClient
[−]
[src]
pub struct TestBlockChainClient { pub blocks: RwLock<HashMap<H256, Bytes>>, pub numbers: RwLock<HashMap<usize, H256>>, pub genesis_hash: H256, pub last_hash: RwLock<H256>, pub extra_data: Bytes, pub difficulty: RwLock<U256>, pub balances: RwLock<HashMap<Address, U256>>, pub nonces: RwLock<HashMap<Address, U256>>, pub storage: RwLock<HashMap<(Address, H256), H256>>, pub code: RwLock<HashMap<Address, Bytes>>, pub execution_result: RwLock<Option<Result<Executed, CallError>>>, pub receipts: RwLock<HashMap<TransactionId, LocalizedReceipt>>, pub logs: RwLock<Vec<LocalizedLogEntry>>, pub queue_size: AtomicUsize, pub miner: Arc<Miner>, pub spec: Spec, pub latest_block_timestamp: RwLock<u64>, pub ancient_block: RwLock<Option<(H256, u64)>>, pub first_block: RwLock<Option<(H256, u64)>>, pub traces: RwLock<Option<Vec<LocalizedTrace>>>, pub history: RwLock<Option<u64>>, pub disabled: AtomicBool, }
Test client.
Fields
blocks: RwLock<HashMap<H256, Bytes>>
Blocks.
numbers: RwLock<HashMap<usize, H256>>
Mapping of numbers to hashes.
genesis_hash: H256
Genesis block hash.
last_hash: RwLock<H256>
Last block hash.
extra_data: Bytes
Extra data do set for each block
difficulty: RwLock<U256>
Difficulty.
balances: RwLock<HashMap<Address, U256>>
Balances.
nonces: RwLock<HashMap<Address, U256>>
Nonces.
storage: RwLock<HashMap<(Address, H256), H256>>
Storage.
code: RwLock<HashMap<Address, Bytes>>
Code.
execution_result: RwLock<Option<Result<Executed, CallError>>>
Execution result.
receipts: RwLock<HashMap<TransactionId, LocalizedReceipt>>
Transaction receipts.
logs: RwLock<Vec<LocalizedLogEntry>>
Logs
queue_size: AtomicUsize
Block queue size.
miner: Arc<Miner>
Miner
spec: Spec
Spec
latest_block_timestamp: RwLock<u64>
Timestamp assigned to latest sealed block
ancient_block: RwLock<Option<(H256, u64)>>
Ancient block info.
first_block: RwLock<Option<(H256, u64)>>
First block info.
traces: RwLock<Option<Vec<LocalizedTrace>>>
Traces to return
history: RwLock<Option<u64>>
Pruning history size to report.
disabled: AtomicBool
Is disabled
Methods
impl TestBlockChainClient
[src]
impl TestBlockChainClient
pub fn new() -> Self
[src]
pub fn new() -> Self
Creates new test client.
pub fn new_with_extra_data(extra_data: Bytes) -> Self
[src]
pub fn new_with_extra_data(extra_data: Bytes) -> Self
Creates new test client with specified extra data for each block
pub fn new_with_spec(spec: Spec) -> Self
[src]
pub fn new_with_spec(spec: Spec) -> Self
Create test client with custom spec.
pub fn new_with_spec_and_extra(spec: Spec, extra_data: Bytes) -> Self
[src]
pub fn new_with_spec_and_extra(spec: Spec, extra_data: Bytes) -> Self
Create test client with custom spec and extra data.
pub fn set_transaction_receipt(
&self,
id: TransactionId,
receipt: LocalizedReceipt
)
[src]
pub fn set_transaction_receipt(
&self,
id: TransactionId,
receipt: LocalizedReceipt
)
Set the transaction receipt result
pub fn set_execution_result(&self, result: Result<Executed, CallError>)
[src]
pub fn set_execution_result(&self, result: Result<Executed, CallError>)
Set the execution result.
pub fn set_balance(&self, address: Address, balance: U256)
[src]
pub fn set_balance(&self, address: Address, balance: U256)
Set the balance of account address
to balance
.
pub fn set_nonce(&self, address: Address, nonce: U256)
[src]
pub fn set_nonce(&self, address: Address, nonce: U256)
Set nonce of account address
to nonce
.
pub fn set_code(&self, address: Address, code: Bytes)
[src]
pub fn set_code(&self, address: Address, code: Bytes)
Set code
at address
.
pub fn set_storage(&self, address: Address, position: H256, value: H256)
[src]
pub fn set_storage(&self, address: Address, position: H256, value: H256)
Set storage position
to value
for account address
.
pub fn set_queue_size(&self, size: usize)
[src]
pub fn set_queue_size(&self, size: usize)
Set block queue size for testing
pub fn set_latest_block_timestamp(&self, ts: u64)
[src]
pub fn set_latest_block_timestamp(&self, ts: u64)
Set timestamp assigned to latest sealed block
pub fn set_logs(&self, logs: Vec<LocalizedLogEntry>)
[src]
pub fn set_logs(&self, logs: Vec<LocalizedLogEntry>)
Set logs to return for each logs call.
pub fn add_blocks(&self, count: usize, with: EachBlockWith)
[src]
pub fn add_blocks(&self, count: usize, with: EachBlockWith)
Add blocks to test client.
pub fn corrupt_block(&self, n: BlockNumber)
[src]
pub fn corrupt_block(&self, n: BlockNumber)
Make a bad block by setting invalid extra data.
pub fn corrupt_block_parent(&self, n: BlockNumber)
[src]
pub fn corrupt_block_parent(&self, n: BlockNumber)
Make a bad block by setting invalid parent hash.
pub fn block_hash_delta_minus(&mut self, delta: usize) -> H256
[src]
pub fn block_hash_delta_minus(&mut self, delta: usize) -> H256
Get block hash with delta
as offset from the most recent blocks.
pub fn insert_transaction_with_gas_price_to_queue(
&self,
gas_price: U256
) -> H256
[src]
pub fn insert_transaction_with_gas_price_to_queue(
&self,
gas_price: U256
) -> H256
Inserts a transaction with given gas price to miners transactions queue.
pub fn insert_transaction_to_queue(&self) -> H256
[src]
pub fn insert_transaction_to_queue(&self) -> H256
Inserts a transaction to miners transactions queue.
pub fn set_history(&self, h: Option<u64>)
[src]
pub fn set_history(&self, h: Option<u64>)
Set reported history size.
pub fn is_disabled(&self) -> bool
[src]
pub fn is_disabled(&self) -> bool
Returns true if the client has been disabled.
Trait Implementations
impl Default for TestBlockChainClient
[src]
impl Default for TestBlockChainClient
impl ReopenBlock for TestBlockChainClient
[src]
impl ReopenBlock for TestBlockChainClient
fn reopen_block(&self, block: ClosedBlock) -> OpenBlock
[src]
fn reopen_block(&self, block: ClosedBlock) -> OpenBlock
Reopens an OpenBlock and updates uncles.
impl PrepareOpenBlock for TestBlockChainClient
[src]
impl PrepareOpenBlock for TestBlockChainClient
fn prepare_open_block(
&self,
author: Address,
gas_range_target: (U256, U256),
extra_data: Bytes
) -> OpenBlock
[src]
fn prepare_open_block(
&self,
author: Address,
gas_range_target: (U256, U256),
extra_data: Bytes
) -> OpenBlock
Returns OpenBlock prepared for closing.
impl ScheduleInfo for TestBlockChainClient
[src]
impl ScheduleInfo for TestBlockChainClient
fn latest_schedule(&self) -> Schedule
[src]
fn latest_schedule(&self) -> Schedule
Returns latest schedule.
impl ImportSealedBlock for TestBlockChainClient
[src]
impl ImportSealedBlock for TestBlockChainClient
fn import_sealed_block(&self, _block: SealedBlock) -> ImportResult
[src]
fn import_sealed_block(&self, _block: SealedBlock) -> ImportResult
Import sealed block. Skips all verifications.
impl BlockProducer for TestBlockChainClient
[src]
impl BlockProducer for TestBlockChainClient
impl BroadcastProposalBlock for TestBlockChainClient
[src]
impl BroadcastProposalBlock for TestBlockChainClient
fn broadcast_proposal_block(&self, _block: SealedBlock)
[src]
fn broadcast_proposal_block(&self, _block: SealedBlock)
Broadcast a block proposal.
impl SealedBlockImporter for TestBlockChainClient
[src]
impl SealedBlockImporter for TestBlockChainClient
impl TransactionVerifierClient for TestBlockChainClient
[src]
impl TransactionVerifierClient for TestBlockChainClient
impl BlockChainClient for TestBlockChainClient
[src]
impl BlockChainClient for TestBlockChainClient
impl Nonce for TestBlockChainClient
[src]
impl Nonce for TestBlockChainClient
fn nonce(&self, address: &Address, id: BlockId) -> Option<U256>
[src]
fn nonce(&self, address: &Address, id: BlockId) -> Option<U256>
Attempt to get address nonce at given block. May not fail on BlockId::Latest. Read more
fn latest_nonce(&self, address: &Address) -> U256
[src]
fn latest_nonce(&self, address: &Address) -> U256
Get address nonce at the latest block's state.
impl Balance for TestBlockChainClient
[src]
impl Balance for TestBlockChainClient
fn balance(&self, address: &Address, state: StateOrBlock) -> Option<U256>
[src]
fn balance(&self, address: &Address, state: StateOrBlock) -> Option<U256>
Get address balance at the given block's state. Read more
fn latest_balance(&self, address: &Address) -> U256
[src]
fn latest_balance(&self, address: &Address) -> U256
Get address balance at the latest block's state.
impl AccountData for TestBlockChainClient
[src]
impl AccountData for TestBlockChainClient
impl ChainInfo for TestBlockChainClient
[src]
impl ChainInfo for TestBlockChainClient
fn chain_info(&self) -> BlockChainInfo
[src]
fn chain_info(&self) -> BlockChainInfo
Get blockchain information.
impl BlockInfo for TestBlockChainClient
[src]
impl BlockInfo for TestBlockChainClient
fn block_header(&self, id: BlockId) -> Option<Header>
[src]
fn block_header(&self, id: BlockId) -> Option<Header>
Get raw block header data by block id.
fn best_block_header(&self) -> Header
[src]
fn best_block_header(&self) -> Header
Get the best block header.
fn block(&self, id: BlockId) -> Option<Block>
[src]
fn block(&self, id: BlockId) -> Option<Block>
Get raw block data by block header hash.
fn code_hash(&self, address: &Address, id: BlockId) -> Option<H256>
[src]
fn code_hash(&self, address: &Address, id: BlockId) -> Option<H256>
Get address code hash at given block's state.
impl CallContract for TestBlockChainClient
[src]
impl CallContract for TestBlockChainClient
fn call_contract(
&self,
_id: BlockId,
_address: Address,
_data: Bytes
) -> Result<Bytes, String>
[src]
fn call_contract(
&self,
_id: BlockId,
_address: Address,
_data: Bytes
) -> Result<Bytes, String>
Like call
, but with various defaults. Designed to be used for calling contracts.
impl TransactionInfo for TestBlockChainClient
[src]
impl TransactionInfo for TestBlockChainClient
fn transaction_block(&self, _id: TransactionId) -> Option<H256>
[src]
fn transaction_block(&self, _id: TransactionId) -> Option<H256>
Get the hash of block that contains the transaction, if any.
impl BlockChain for TestBlockChainClient
[src]
impl BlockChain for TestBlockChainClient
impl RegistryInfo for TestBlockChainClient
[src]
impl RegistryInfo for TestBlockChainClient
fn registry_address(&self, _name: String, _block: BlockId) -> Option<Address>
[src]
fn registry_address(&self, _name: String, _block: BlockId) -> Option<Address>
Get the address of a particular blockchain service, if available.
impl ImportBlock for TestBlockChainClient
[src]
impl ImportBlock for TestBlockChainClient
fn import_block(&self, b: Bytes) -> Result<H256, BlockImportError>
[src]
fn import_block(&self, b: Bytes) -> Result<H256, BlockImportError>
Import a block into the blockchain.
impl Call for TestBlockChainClient
[src]
impl Call for TestBlockChainClient
type State = ()
Type representing chain state
fn call(
&self,
_t: &SignedTransaction,
_analytics: CallAnalytics,
_state: &mut Self::State,
_header: &Header
) -> Result<Executed, CallError>
[src]
fn call(
&self,
_t: &SignedTransaction,
_analytics: CallAnalytics,
_state: &mut Self::State,
_header: &Header
) -> Result<Executed, CallError>
Makes a non-persistent transaction call.
fn call_many(
&self,
txs: &[(SignedTransaction, CallAnalytics)],
state: &mut Self::State,
header: &Header
) -> Result<Vec<Executed>, CallError>
[src]
fn call_many(
&self,
txs: &[(SignedTransaction, CallAnalytics)],
state: &mut Self::State,
header: &Header
) -> Result<Vec<Executed>, CallError>
Makes multiple non-persistent but dependent transaction calls. Returns a vector of successes or a failure if any of the transaction fails. Read more
fn estimate_gas(
&self,
_t: &SignedTransaction,
_state: &Self::State,
_header: &Header
) -> Result<U256, CallError>
[src]
fn estimate_gas(
&self,
_t: &SignedTransaction,
_state: &Self::State,
_header: &Header
) -> Result<U256, CallError>
Estimates how much gas will be necessary for a call.
impl StateClient for TestBlockChainClient
[src]
impl StateClient for TestBlockChainClient
type State = ()
Type representing chain state
fn latest_state(&self) -> Self::State
[src]
fn latest_state(&self) -> Self::State
Get a copy of the best block's state.
fn state_at(&self, _id: BlockId) -> Option<Self::State>
[src]
fn state_at(&self, _id: BlockId) -> Option<Self::State>
Attempt to get a copy of a specific block's final state. Read more
impl EngineInfo for TestBlockChainClient
[src]
impl EngineInfo for TestBlockChainClient
impl BlockChainClient for TestBlockChainClient
[src]
impl BlockChainClient for TestBlockChainClient
fn replay(
&self,
_id: TransactionId,
_analytics: CallAnalytics
) -> Result<Executed, CallError>
[src]
fn replay(
&self,
_id: TransactionId,
_analytics: CallAnalytics
) -> Result<Executed, CallError>
Replays a given transaction for inspection.
fn replay_block_transactions(
&self,
_block: BlockId,
_analytics: CallAnalytics
) -> Result<Box<Iterator<Item = Executed>>, CallError>
[src]
fn replay_block_transactions(
&self,
_block: BlockId,
_analytics: CallAnalytics
) -> Result<Box<Iterator<Item = Executed>>, CallError>
Replays all the transactions in a given block for inspection.
fn block_total_difficulty(&self, _id: BlockId) -> Option<U256>
[src]
fn block_total_difficulty(&self, _id: BlockId) -> Option<U256>
Get block total difficulty.
fn block_hash(&self, id: BlockId) -> Option<H256>
[src]
fn block_hash(&self, id: BlockId) -> Option<H256>
Get block hash.
fn storage_root(&self, _address: &Address, _id: BlockId) -> Option<H256>
[src]
fn storage_root(&self, _address: &Address, _id: BlockId) -> Option<H256>
Attempt to get address storage root at given block. May not fail on BlockId::Latest. Read more
fn code(&self, address: &Address, state: StateOrBlock) -> Option<Option<Bytes>>
[src]
fn code(&self, address: &Address, state: StateOrBlock) -> Option<Option<Bytes>>
Get address code at given block's state.
fn storage_at(
&self,
address: &Address,
position: &H256,
state: StateOrBlock
) -> Option<H256>
[src]
fn storage_at(
&self,
address: &Address,
position: &H256,
state: StateOrBlock
) -> Option<H256>
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
fn list_accounts(
&self,
_id: BlockId,
_after: Option<&Address>,
_count: u64
) -> Option<Vec<Address>>
[src]
fn list_accounts(
&self,
_id: BlockId,
_after: Option<&Address>,
_count: u64
) -> Option<Vec<Address>>
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
fn list_storage(
&self,
_id: BlockId,
_account: &Address,
_after: Option<&H256>,
_count: u64
) -> Option<Vec<H256>>
[src]
fn list_storage(
&self,
_id: BlockId,
_account: &Address,
_after: Option<&H256>,
_count: u64
) -> Option<Vec<H256>>
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
fn transaction(&self, _id: TransactionId) -> Option<LocalizedTransaction>
[src]
fn transaction(&self, _id: TransactionId) -> Option<LocalizedTransaction>
Get transaction with given hash.
fn uncle(&self, _id: UncleId) -> Option<Header>
[src]
fn uncle(&self, _id: UncleId) -> Option<Header>
Get uncle with given id.
fn uncle_extra_info(&self, _id: UncleId) -> Option<BTreeMap<String, String>>
[src]
fn uncle_extra_info(&self, _id: UncleId) -> Option<BTreeMap<String, String>>
Returns engine-related extra info for UncleId
.
fn transaction_receipt(&self, id: TransactionId) -> Option<LocalizedReceipt>
[src]
fn transaction_receipt(&self, id: TransactionId) -> Option<LocalizedReceipt>
Get transaction receipt with given hash.
fn logs(&self, filter: Filter) -> Vec<LocalizedLogEntry>
[src]
fn logs(&self, filter: Filter) -> Vec<LocalizedLogEntry>
Returns logs matching given filter.
fn last_hashes(&self) -> LastHashes
[src]
fn last_hashes(&self) -> LastHashes
Get last hashes starting from best block.
fn block_number(&self, id: BlockId) -> Option<BlockNumber>
[src]
fn block_number(&self, id: BlockId) -> Option<BlockNumber>
Look up the block number for the given block ID.
fn block_body(&self, id: BlockId) -> Option<Body>
[src]
fn block_body(&self, id: BlockId) -> Option<Body>
Get raw block body data by block id. Block body is an RLP list of two items: uncles and transactions. Read more
fn block_extra_info(&self, id: BlockId) -> Option<BTreeMap<String, String>>
[src]
fn block_extra_info(&self, id: BlockId) -> Option<BTreeMap<String, String>>
Returns engine-related extra info for BlockId
.
fn block_status(&self, id: BlockId) -> BlockStatus
[src]
fn block_status(&self, id: BlockId) -> BlockStatus
Get block status by block header hash.
fn tree_route(&self, from: &H256, to: &H256) -> Option<TreeRoute>
[src]
fn tree_route(&self, from: &H256, to: &H256) -> Option<TreeRoute>
Get a tree route between from
and to
. See BlockChain::tree_route
. Read more
fn find_uncles(&self, _hash: &H256) -> Option<Vec<H256>>
[src]
fn find_uncles(&self, _hash: &H256) -> Option<Vec<H256>>
Get all possible uncle hashes for a block.
fn state_data(&self, hash: &H256) -> Option<Bytes>
[src]
fn state_data(&self, hash: &H256) -> Option<Bytes>
Get latest state node
fn block_receipts(&self, hash: &H256) -> Option<Bytes>
[src]
fn block_receipts(&self, hash: &H256) -> Option<Bytes>
Get raw block receipts data by block header hash.
fn queue_info(&self) -> QueueInfo
[src]
fn queue_info(&self) -> QueueInfo
Get block queue information.
fn clear_queue(&self)
[src]
fn clear_queue(&self)
Clear block queue and abort all import activity.
fn additional_params(&self) -> BTreeMap<String, String>
[src]
fn additional_params(&self) -> BTreeMap<String, String>
Get the registrar address, if it exists.
fn filter_traces(&self, _filter: TraceFilter) -> Option<Vec<LocalizedTrace>>
[src]
fn filter_traces(&self, _filter: TraceFilter) -> Option<Vec<LocalizedTrace>>
Returns traces matching given filter.
fn trace(&self, _trace: TraceId) -> Option<LocalizedTrace>
[src]
fn trace(&self, _trace: TraceId) -> Option<LocalizedTrace>
Returns trace with given id.
fn transaction_traces(
&self,
_trace: TransactionId
) -> Option<Vec<LocalizedTrace>>
[src]
fn transaction_traces(
&self,
_trace: TransactionId
) -> Option<Vec<LocalizedTrace>>
Returns traces created by transaction.
fn block_traces(&self, _trace: BlockId) -> Option<Vec<LocalizedTrace>>
[src]
fn block_traces(&self, _trace: BlockId) -> Option<Vec<LocalizedTrace>>
Returns traces created by transaction from block.
fn ready_transactions(&self, max_len: usize) -> Vec<Arc<VerifiedTransaction>>
[src]
fn ready_transactions(&self, max_len: usize) -> Vec<Arc<VerifiedTransaction>>
List all transactions that are allowed into the next block.
fn signing_chain_id(&self) -> Option<u64>
[src]
fn signing_chain_id(&self) -> Option<u64>
Get the preferred chain ID to sign on
fn mode(&self) -> Mode
[src]
fn mode(&self) -> Mode
Get the mode.
fn set_mode(&self, _: Mode)
[src]
fn set_mode(&self, _: Mode)
Set the mode.
fn spec_name(&self) -> String
[src]
fn spec_name(&self) -> String
Get the chain spec name.
fn set_spec_name(&self, _: String)
[src]
fn set_spec_name(&self, _: String)
Set the chain via a spec name.
fn disable(&self)
[src]
fn disable(&self)
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
fn pruning_info(&self) -> PruningInfo
[src]
fn pruning_info(&self) -> PruningInfo
Returns information about pruning/data availability.
fn transact_contract(&self, address: Address, data: Bytes) -> Result<(), Error>
[src]
fn transact_contract(&self, address: Address, data: Bytes) -> Result<(), Error>
Schedule state-altering transaction to be executed on the next pending block.
fn registrar_address(&self) -> Option<Address>
[src]
fn registrar_address(&self) -> Option<Address>
Get the address of the registry itself.
fn eip86_transition(&self) -> u64
[src]
fn eip86_transition(&self) -> u64
Get the EIP-86 transition block number.
fn latest_code(&self, address: &Address) -> Option<Bytes>
[src]
fn latest_code(&self, address: &Address) -> Option<Bytes>
Get address code at the latest block's state.
fn latest_storage_at(&self, address: &Address, position: &H256) -> H256
[src]
fn latest_storage_at(&self, address: &Address, position: &H256) -> H256
Get value of the storage at given position at the latest block's state.
fn gas_price_corpus(&self, sample_size: usize) -> Corpus<U256>
[src]
fn gas_price_corpus(&self, sample_size: usize) -> Corpus<U256>
Sorted list of transaction gas prices from at least last sample_size blocks.
impl IoClient for TestBlockChainClient
[src]
impl IoClient for TestBlockChainClient
fn queue_transactions(&self, transactions: Vec<Bytes>, _peer_id: usize)
[src]
fn queue_transactions(&self, transactions: Vec<Bytes>, _peer_id: usize)
Queue transactions for importing.
fn queue_ancient_block(
&self,
b: Bytes,
_r: Bytes
) -> Result<H256, BlockImportError>
[src]
fn queue_ancient_block(
&self,
b: Bytes,
_r: Bytes
) -> Result<H256, BlockImportError>
Queue block import with transaction receipts. Does no sealing and transaction validation.
fn queue_consensus_message(&self, message: Bytes)
[src]
fn queue_consensus_message(&self, message: Bytes)
Queue conensus engine message.
impl ProvingBlockChainClient for TestBlockChainClient
[src]
impl ProvingBlockChainClient for TestBlockChainClient
fn prove_storage(
&self,
_: H256,
_: H256,
_: BlockId
) -> Option<(Vec<Bytes>, H256)>
[src]
fn prove_storage(
&self,
_: H256,
_: H256,
_: BlockId
) -> Option<(Vec<Bytes>, H256)>
Prove account storage at a specific block id. Read more
fn prove_account(
&self,
_: H256,
_: BlockId
) -> Option<(Vec<Bytes>, BasicAccount)>
[src]
fn prove_account(
&self,
_: H256,
_: BlockId
) -> Option<(Vec<Bytes>, BasicAccount)>
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
fn prove_transaction(
&self,
_: SignedTransaction,
_: BlockId
) -> Option<(Bytes, Vec<DBValue>)>
[src]
fn prove_transaction(
&self,
_: SignedTransaction,
_: BlockId
) -> Option<(Bytes, Vec<DBValue>)>
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
fn epoch_signal(&self, _: H256) -> Option<Vec<u8>>
[src]
fn epoch_signal(&self, _: H256) -> Option<Vec<u8>>
Get an epoch change signal by block hash.
impl EngineClient for TestBlockChainClient
[src]
impl EngineClient for TestBlockChainClient
fn update_sealing(&self)
[src]
fn update_sealing(&self)
Make a new block and seal it.
fn submit_seal(&self, block_hash: H256, seal: Vec<Bytes>)
[src]
fn submit_seal(&self, block_hash: H256, seal: Vec<Bytes>)
Submit a seal for a block in the mining queue.
fn broadcast_consensus_message(&self, _message: Bytes)
[src]
fn broadcast_consensus_message(&self, _message: Bytes)
Broadcast a consensus message to the network.
fn epoch_transition_for(&self, _block_hash: H256) -> Option<EpochTransition>
[src]
fn epoch_transition_for(&self, _block_hash: H256) -> Option<EpochTransition>
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
fn as_full_client(&self) -> Option<&BlockChainClient>
[src]
fn as_full_client(&self) -> Option<&BlockChainClient>
Attempt to cast the engine client to a full client.
fn block_number(&self, id: BlockId) -> Option<BlockNumber>
[src]
fn block_number(&self, id: BlockId) -> Option<BlockNumber>
Get a block number by ID.
fn block_header(&self, id: BlockId) -> Option<Header>
[src]
fn block_header(&self, id: BlockId) -> Option<Header>
Get raw block header data by block id.
Auto Trait Implementations
impl Send for TestBlockChainClient
impl Send for TestBlockChainClient
impl Sync for TestBlockChainClient
impl Sync for TestBlockChainClient