[−][src]Struct exonum_btc_anchoring::test_helpers::AnchoringTestKit
Convenient wrapper around testkit with the built-in bitcoin key pool for the each anchoring node.
Fields
inner: TestKit
Underlying testkit instance.
Methods
impl AnchoringTestKit
[src]
pub fn new(nodes_num: u16, anchoring_interval: u64) -> Self
[src]
Creates an anchoring testkit instance for the specified number of anchoring nodes, and interval between anchors.
pub fn actual_anchoring_config(&self) -> Config
[src]
Returns the actual anchoring configuration.
pub fn last_anchoring_tx(&self) -> Option<Transaction>
[src]
Returns the latest anchoring transaction.
pub fn anchoring_transaction_proposal(
&self
) -> Option<(Transaction, Vec<Transaction>)>
[src]
&self
) -> Option<(Transaction, Vec<Transaction>)>
Returns the proposal of the next anchoring transaction for the actual anchoring state.
pub fn create_signature_tx_for_node(
&self,
node: &TestNode
) -> Result<Vec<Verified<AnyTx>>, BuilderError>
[src]
&self,
node: &TestNode
) -> Result<Vec<Verified<AnyTx>>, BuilderError>
Creates signatures for each input of the proposed anchoring transaction signed by the specified node.
pub fn create_signature_txs(&self) -> Vec<Vec<Verified<AnyTx>>>
[src]
Creates signatures for each input of the proposed anchoring transaction signed by all of anchoring nodes.
pub fn create_funding_confirmation_txs(
&self,
satoshis: u64
) -> (Vec<Verified<AnyTx>>, Transaction)
[src]
&self,
satoshis: u64
) -> (Vec<Verified<AnyTx>>, Transaction)
Creates the confirmation transactions with a funding transaction to the current address with a given amount of Satoshi.
pub fn create_funding_confirmation_txs_with(
&self,
transaction: Transaction
) -> Vec<Verified<AnyTx>>
[src]
&self,
transaction: Transaction
) -> Vec<Verified<AnyTx>>
Creates the confirmation transactions with a specified funding transaction.
pub fn create_config_change_tx(
&self,
proposal: ConfigPropose
) -> Verified<AnyTx>
[src]
&self,
proposal: ConfigPropose
) -> Verified<AnyTx>
Creates configuration change transaction for simple supervisor.
pub fn add_node(&mut self) -> AnchoringKeys
[src]
Adds a new auditor node to the testkit network and create Bitcoin keypair for it.
pub fn node_private_key(&self, public_key: &PublicKey) -> PrivateKey
[src]
Returns a corresponding private Bitcoin key.
pub fn gen_bitcoin_key(&mut self) -> PublicKey
[src]
Generates bitcoin keypair and adds them to the key pool.
pub fn block_hash_on_height(&self, height: Height) -> Hash
[src]
Returns the block hash for the given blockchain height.
pub fn anchoring_keypairs(
&self
) -> impl IntoIterator<Item = (PublicKey, PrivateKey)>
[src]
&self
) -> impl IntoIterator<Item = (PublicKey, PrivateKey)>
Returns Bitcoin key pairs of anchoring nodes.
pub fn find_anchoring_node(&self, bitcoin_key: &PublicKey) -> Option<&TestNode>
[src]
Finds anchoring node with the specified bitcoin key.
Trait Implementations
impl Debug for AnchoringTestKit
[src]
impl Default for AnchoringTestKit
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AnchoringTestKit
impl Send for AnchoringTestKit
impl !Sync for AnchoringTestKit
impl Unpin for AnchoringTestKit
impl !UnwindSafe for AnchoringTestKit
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> From<T> for T
[src]
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,