[][src]Struct exonum_testkit::TestNode

pub struct TestNode { /* fields omitted */ }

An emulated node in the test network.

Methods

impl TestNode[src]

pub fn new_auditor() -> Self[src]

Creates a new auditor.

pub fn new_validator(validator_id: ValidatorId) -> Self[src]

Creates a new validator with the given id.

pub fn from_parts(
    consensus_keys: impl Into<KeyPair>,
    service_keys: impl Into<KeyPair>,
    validator_id: Option<ValidatorId>
) -> Self
[src]

Constructs a new node from the given keypairs.

pub fn create_precommit(
    &self,
    height: Height,
    block_hash: Hash
) -> Verified<Precommit>
[src]

Creates a Precommit message signed by this validator.

pub fn public_keys(&self) -> ValidatorKeys[src]

Returns public keys of the node.

pub fn validator_id(&self) -> Option<ValidatorId>[src]

Returns the current validator id of node if it is validator of the test network.

pub fn change_role(&mut self, role: Option<ValidatorId>)[src]

Changes node role.

pub fn service_keypair(&self) -> KeyPair[src]

Returns the service keypair of the node.

pub fn consensus_keypair(&self) -> KeyPair[src]

Returns the consensus keypair of the node.

Trait Implementations

impl Clone for TestNode[src]

impl Debug for TestNode[src]

impl<'de> Deserialize<'de> for TestNode[src]

impl Eq for TestNode[src]

impl From<TestNode> for ValidatorKeys[src]

impl PartialEq<TestNode> for TestNode[src]

impl Serialize for TestNode[src]

impl StructuralEq for TestNode[src]

impl StructuralPartialEq for TestNode[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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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<V, T> VZip<V> for T where
    V: MultiLane<T>,