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

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

Current state of the BTC anchoring service.

Variants

Regular

The usual anchoring workflow.

Fields of Regular

actual_configuration: GlobalConfig

Current anchoring configuration.

Transition

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

Fields of Transition

actual_configuration: GlobalConfig

Current anchoring configuration.

following_configuration: GlobalConfig

Following anchoring configuration.

Methods

impl BtcAnchoringState[src]

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

Returns the redeem script which corresponds 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 transition state.

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

Returns the actual anchoring configuration.

pub fn following_configuration(&self) -> Option<&GlobalConfig>[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]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for BtcAnchoringState[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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