[−][src]Struct exonum_testkit::TestNode
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_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.
pub fn create_propose(
&self,
height: Height,
last_hash: &Hash,
tx_hashes: &[Hash]
) -> Signed<Propose>[src]
&self,
height: Height,
last_hash: &Hash,
tx_hashes: &[Hash]
) -> Signed<Propose>
Creates a Propose message signed by this validator.
pub fn create_precommit(
&self,
propose: &Propose,
block_hash: &Hash
) -> Signed<Precommit>[src]
&self,
propose: &Propose,
block_hash: &Hash
) -> Signed<Precommit>
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) -> (&PublicKey, &SecretKey)[src]
Returns the service keypair.
Trait Implementations
impl Clone for TestNode[src]
fn clone(&self) -> TestNode[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq<TestNode> for TestNode[src]
impl From<TestNode> for ValidatorKeys[src]
impl Debug for TestNode[src]
impl Serialize for TestNode[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl<'de> Deserialize<'de> for TestNode[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)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> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Erased for T
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
impl<T> Same for T
type Output = T
Should always be Self
impl<T> Serialize for T where
T: Serialize + ?Sized, [src]
T: Serialize + ?Sized,