[−][src]Struct exonum_testkit::TestNetwork
Emulated test network.
Methods
impl TestNetwork
[src]
pub fn new(validator_count: u16) -> Self
[src]
Creates a new emulated network.
pub fn with_our_role(us: Option<ValidatorId>, validator_count: u16) -> Self
[src]
Creates a new emulated network with a specific role of the node the network will be viewed from.
pub fn us(&self) -> &TestNode
[src]
Returns the node in the emulated network, from whose perspective the testkit operates.
pub fn validators(&self) -> &[TestNode]
[src]
Returns a slice of all validators in the network.
pub fn genesis_config(&self) -> GenesisConfig
[src]
Returns config encoding the network structure usable for creating the genesis block of a blockchain.
pub fn update<I: IntoIterator<Item = TestNode>>(
&mut self,
us: TestNode,
validators: I
)
[src]
&mut self,
us: TestNode,
validators: I
)
Updates the test network by the new set of nodes.
pub fn update_configuration(&mut self, config: TestNetworkConfiguration)
[src]
Updates the test network with a new configuration.
pub fn service_public_key_of(&self, id: ValidatorId) -> Option<&PublicKey>
[src]
Returns service public key of the validator with given id.
pub fn consensus_public_key_of(&self, id: ValidatorId) -> Option<&PublicKey>
[src]
Returns consensus public key of the validator with given id.
Trait Implementations
impl Clone for TestNetwork
[src]
fn clone(&self) -> TestNetwork
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for TestNetwork
[src]
impl Serialize for TestNetwork
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for TestNetwork
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Sync for TestNetwork
impl Send for TestNetwork
impl Unpin for TestNetwork
impl RefUnwindSafe for TestNetwork
impl UnwindSafe for TestNetwork
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> From<T> for T
[src]
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> 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Erased for T
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>,