[][src]Struct exonum_btc_anchoring::blockchain::schema::BtcAnchoringSchema

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

Information schema for exonum-btc-anchoring.

Methods

impl<T: AsRef<dyn Snapshot>> BtcAnchoringSchema<T>[src]

pub fn new(snapshot: T) -> Self[src]

Constructs schema for the given database snapshot.

pub fn anchoring_transactions_chain(&self) -> ProofListIndex<&T, Transaction>[src]

Returns table that contains complete chain of the anchoring transactions.

pub fn spent_funding_transactions(&self) -> ProofMapIndex<&T, Hash, Transaction>[src]

Returns the table that contains already spent funding transactions.

pub fn transaction_signatures(
    &self
) -> ProofMapIndex<&T, TxInputId, InputSignatures>
[src]

Returns the table that contains signatures for the given transaction input.

pub fn anchored_blocks(&self) -> ProofListIndex<&T, Hash>[src]

Returns a list of hashes of Exonum blocks headers.

pub fn state_hash(&self) -> Vec<Hash>[src]

Returns hashes of the stored tables.

pub fn actual_configuration(&self) -> GlobalConfig[src]

Returns the actual anchoring configuration.

pub fn following_configuration(&self) -> Option<GlobalConfig>[src]

Returns the nearest following configuration if it exists.

pub fn input_signatures(
    &self,
    input: &TxInputId,
    redeem_script: &RedeemScript
) -> InputSignatures
[src]

Returns the list of signatures for the given transaction input.

pub fn actual_state(&self) -> BtcAnchoringState[src]

Returns the actual state of anchoring.

pub fn proposed_anchoring_transaction(
    &self,
    actual_state: &BtcAnchoringState
) -> Option<Result<(Transaction, Vec<Transaction>), BuilderError>>
[src]

Returns the proposal of next anchoring transaction for the given anchoring state.

pub fn actual_proposed_anchoring_transaction(
    &self
) -> Option<Result<(Transaction, Vec<Transaction>), BuilderError>>
[src]

Returns the proposal of next anchoring transaction for the actual anchoring state.

pub fn unspent_funding_transaction(&self) -> Option<Transaction>[src]

Returns the unspent funding transaction if it is exist.

pub fn latest_anchored_height(&self) -> Option<Height>[src]

Returns the height of the latest anchored block.

impl<'a> BtcAnchoringSchema<&'a mut Fork>[src]

pub fn anchoring_transactions_chain_mut(
    &mut self
) -> ProofListIndex<&mut Fork, Transaction>
[src]

Mutable variant of the anchoring_transactions_chain index.

pub fn spent_funding_transactions_mut(
    &mut self
) -> ProofMapIndex<&mut Fork, Hash, Transaction>
[src]

Mutable variant of the spent_funding_transactions index.

pub fn transaction_signatures_mut(
    &mut self
) -> ProofMapIndex<&mut Fork, TxInputId, InputSignatures>
[src]

Mutable variant of the anchored_blocks index.

pub fn anchored_blocks_mut(&mut self) -> ProofListIndex<&mut Fork, Hash>[src]

Mutable variant of the anchored_blocks index.

Trait Implementations

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

Auto Trait Implementations

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

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

Blanket Implementations

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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