[−][src]Struct exonum_btc_anchoring::config::GlobalConfig
Consensus parameters in the BTC anchoring.
Fields
network: Network
Type of the used BTC network.
public_keys: Vec<PublicKey>
Bitcoin public keys of validators from from which the current anchoring redeem script can be calculated.
anchoring_interval: u64
Interval in blocks between anchored blocks.
transaction_fee: u64
Fee per byte in satoshis.
funding_transaction: Option<Transaction>
Funding transaction.
Methods
impl GlobalConfig
[src]
pub fn with_public_keys(
network: Network,
keys: impl IntoIterator<Item = PublicKey>
) -> Result<Self, RedeemScriptError>
[src]
network: Network,
keys: impl IntoIterator<Item = PublicKey>
) -> Result<Self, RedeemScriptError>
Creates global configuration instance with default parameters for the given Bitcoin network and public keys of participants.
pub fn anchoring_address(&self) -> Address
[src]
Returns the corresponding Bitcoin address.
pub fn redeem_script(&self) -> RedeemScript
[src]
Returns the corresponding redeem script.
pub fn previous_anchoring_height(&self, current_height: Height) -> Height
[src]
Returns the latest height below the given height which must be anchored.
pub fn following_anchoring_height(&self, current_height: Height) -> Height
[src]
Returns the nearest height above the given height which must be anchored.
Trait Implementations
impl PartialEq<GlobalConfig> for GlobalConfig
[src]
fn eq(&self, other: &GlobalConfig) -> bool
[src]
fn ne(&self, other: &GlobalConfig) -> bool
[src]
impl Clone for GlobalConfig
[src]
fn clone(&self) -> GlobalConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for GlobalConfig
[src]
impl Debug for GlobalConfig
[src]
impl Serialize for GlobalConfig
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for GlobalConfig
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for GlobalConfig
impl Sync for GlobalConfig
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,