[][src]Struct exonum::blockchain::Schema

pub struct Schema<T> { /* fields omitted */ }

Information schema for indexes maintained by the Exonum core logic.

Indexes defined by this schema are present in the blockchain regardless of the deployed services and store general-purpose information, such as committed transactions.

Methods

impl<T: Access> Schema<T>[src]

pub fn transactions(&self) -> MapIndex<T::Base, Hash, Verified<AnyTx>>[src]

Returns a table that represents a map with a key-value pair of a transaction hash and raw transaction message.

pub fn call_records(&self, block_height: Height) -> Option<CallRecords<T>>[src]

Returns a record of errors that occurred during execution of a particular block. If the block is not committed, returns None.

pub fn transaction_result(
    &self,
    location: TxLocation
) -> Option<Result<(), ExecutionError>>
[src]

Returns the result of the execution for a transaction with the specified location. If the location does not correspond to a transaction, returns None.

pub fn transactions_len(&self) -> u64[src]

Returns the number of committed transactions in the blockchain.

pub fn transactions_pool(&self) -> KeySetIndex<T::Base, Hash>[src]

Returns a table that represents a set of uncommitted transactions hashes.

Stability

Since a signature of this method could be changed in the future due to performance reasons, this method is considered unstable.

pub fn transactions_pool_len(&self) -> u64[src]

Returns the number of transactions in the pool.

pub fn transactions_locations(&self) -> MapIndex<T::Base, Hash, TxLocation>[src]

Returns a table that keeps the block height and transaction position inside the block for every transaction hash.

pub fn blocks(&self) -> MapIndex<T::Base, Hash, Block>[src]

Returns a table that stores a block object for every block height.

pub fn block_hashes_by_height(&self) -> ListIndex<T::Base, Hash>[src]

Returns a table that keeps block hashes for corresponding block heights.

pub fn block_transactions(
    &self,
    height: Height
) -> ProofListIndex<T::Base, Hash>
[src]

Returns a table that keeps a list of transactions for each block.

pub fn block_skip(&self) -> Option<Block>[src]

Returns the recorded block skip, if any.

pub fn block_skip_and_precommits(&self) -> Option<BlockProof>[src]

Returns the recorded block skip together with authenticating information.

pub fn precommits(&self, hash: &Hash) -> ListIndex<T::Base, Verified<Precommit>>[src]

Returns a table that keeps a list of precommits for the block with the given hash.

pub fn block_hash_by_height(&self, height: Height) -> Option<Hash>[src]

Returns the block hash for the given height.

pub fn block_and_precommits(&self, height: Height) -> Option<BlockProof>[src]

Returns the block for the given height with the proof of its inclusion.

pub fn last_block(&self) -> Block[src]

Returns the latest committed block.

Panics

Panics if the genesis block was not created.

pub fn height(&self) -> Height[src]

Returns the height of the latest committed block.

Panics

Panics if invoked before the genesis block was created, e.g. within after_transactions hook for genesis block.

pub fn next_height(&self) -> Height[src]

Returns the height of the block to be committed.

Unlike height, this method never panics.

pub fn consensus_config(&self) -> ConsensusConfig[src]

Returns an actual consensus configuration of the blockchain.

Panics

Panics if the genesis block was not created.

pub fn validator_id(&self, service_public_key: PublicKey) -> Option<ValidatorId>[src]

Attempts to find a ValidatorId by the provided service public key.

Trait Implementations

impl<T: Clone> Clone for Schema<T>[src]

impl<T: Copy> Copy for Schema<T>[src]

impl<T: Debug> Debug for Schema<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Schema<T> where
    T: RefUnwindSafe

impl<T> Send for Schema<T> where
    T: Send

impl<T> Sync for Schema<T> where
    T: Sync

impl<T> Unpin for Schema<T> where
    T: Unpin

impl<T> UnwindSafe for Schema<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,