Struct exonum_testkit::TestNode
[−]
[src]
pub struct TestNode { /* fields omitted */ }
An emulated node in the test network.
Methods
impl TestNode
[src]
fn new_auditor() -> Self
[src]
Creates a new auditor.
fn new_validator(validator_id: ValidatorId) -> Self
[src]
Creates a new validator with the given id.
fn from_parts(
consensus_keypair: (PublicKey, SecretKey),
service_keypair: (PublicKey, SecretKey),
validator_id: Option<ValidatorId>
) -> TestNode
[src]
consensus_keypair: (PublicKey, SecretKey),
service_keypair: (PublicKey, SecretKey),
validator_id: Option<ValidatorId>
) -> TestNode
Constructs a new node from the given keypairs.
fn create_propose(
&self,
height: Height,
last_hash: &Hash,
tx_hashes: &[Hash]
) -> Propose
[src]
&self,
height: Height,
last_hash: &Hash,
tx_hashes: &[Hash]
) -> Propose
Creates a Propose
message signed by this validator.
fn create_precommit(&self, propose: &Propose, block_hash: &Hash) -> Precommit
[src]
Creates a Precommit
message signed by this validator.
fn public_keys(&self) -> ValidatorKeys
[src]
Returns public keys of the node.
fn validator_id(&self) -> Option<ValidatorId>
[src]
Returns the current validator id of node if it is validator of the test network.
fn change_role(&mut self, role: Option<ValidatorId>)
[src]
Change node role.
fn service_keypair(&self) -> (&PublicKey, &SecretKey)
[src]
Returns the service keypar.
Trait Implementations
impl Debug for TestNode
[src]
impl Clone for TestNode
[src]
fn clone(&self) -> TestNode
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more