Struct diem_types::epoch_state::EpochState
source · pub struct EpochState {
pub epoch: u64,
pub verifier: ValidatorVerifier,
}
Expand description
EpochState represents a trusted validator set to validate messages from the specific epoch, it could be updated with EpochChangeProof.
Fields§
§epoch: u64
§verifier: ValidatorVerifier
Implementations§
source§impl EpochState
impl EpochState
Trait Implementations§
source§impl Arbitrary for EpochState
impl Arbitrary for EpochState
§type Parameters = (<u64 as Arbitrary>::Parameters, <ValidatorVerifier as Arbitrary>::Parameters)
type Parameters = (<u64 as Arbitrary>::Parameters, <ValidatorVerifier as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<(<u64 as Arbitrary>::Strategy, <ValidatorVerifier as Arbitrary>::Strategy), fn(_: (u64, ValidatorVerifier)) -> EpochState>
type Strategy = Map<(<u64 as Arbitrary>::Strategy, <ValidatorVerifier as Arbitrary>::Strategy), fn(_: (u64, ValidatorVerifier)) -> EpochState>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for EpochState
impl Clone for EpochState
source§fn clone(&self) -> EpochState
fn clone(&self) -> EpochState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EpochState
impl Debug for EpochState
source§impl<'de> Deserialize<'de> for EpochState
impl<'de> Deserialize<'de> for EpochState
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for EpochState
impl Display for EpochState
source§impl PartialEq<EpochState> for EpochState
impl PartialEq<EpochState> for EpochState
source§fn eq(&self, other: &EpochState) -> bool
fn eq(&self, other: &EpochState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for EpochState
impl Serialize for EpochState
source§impl Verifier for EpochState
impl Verifier for EpochState
source§fn verify(&self, ledger_info: &LedgerInfoWithSignatures) -> Result<()>
fn verify(&self, ledger_info: &LedgerInfoWithSignatures) -> Result<()>
Verify if the ledger_info is trust worthy.
source§fn epoch_change_verification_required(&self, epoch: u64) -> bool
fn epoch_change_verification_required(&self, epoch: u64) -> bool
Returns true in case the given epoch is larger than the existing verifier can support.
In this case the EpochChangeProof should be verified and the verifier updated.
source§fn is_ledger_info_stale(&self, ledger_info: &LedgerInfo) -> bool
fn is_ledger_info_stale(&self, ledger_info: &LedgerInfo) -> bool
Returns true if the given
LedgerInfo
is stale and probably in our
trusted prefix. Read moreimpl Eq for EpochState
impl StructuralEq for EpochState
impl StructuralPartialEq for EpochState
Auto Trait Implementations§
impl RefUnwindSafe for EpochState
impl Send for EpochState
impl Sync for EpochState
impl Unpin for EpochState
impl UnwindSafe for EpochState
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.