[][src]Enum exonum_btc_anchoring::blockchain::BtcAnchoringState

pub enum BtcAnchoringState {
    Regular {
        actual_configuration: Config,
    },
    Transition {
        actual_configuration: Config,
        following_configuration: Config,
    },
}

Current state of the BTC anchoring service.

Variants

Regular

The usual anchoring workflow.

Fields of Regular

actual_configuration: Config

Current anchoring configuration.

Transition

The transition from the current anchoring address to the following one.

Fields of Transition

actual_configuration: Config

Current anchoring configuration.

following_configuration: Config

Following anchoring configuration.

Methods

impl BtcAnchoringState[src]

pub fn redeem_script(&self) -> RedeemScript[src]

Returns the redeem script corresponding to the address to which the anchoring transaction will be sent.

pub fn script_pubkey(&self) -> Script[src]

Returns the script_pubkey for the corresponding redeem script.

pub fn output_address(&self) -> Address[src]

Returns the output address for the corresponding redeem script.

pub fn is_regular(&self) -> bool[src]

Checks that anchoring state is regular.

pub fn is_transition(&self) -> bool[src]

Checks that anchoring is in the transition state.

pub fn actual_config(&self) -> &Config[src]

Returns the actual anchoring configuration.

pub fn following_config(&self) -> Option<&Config>[src]

Returns the following anchoring configuration if anchoring is in transition state.

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

Returns the nearest following anchoring height for the given height.

Trait Implementations

impl Clone for BtcAnchoringState[src]

impl Debug for BtcAnchoringState[src]

Auto Trait Implementations

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<T> Typeable for T where
    T: Any

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