pub enum TrustedStateChange<'a> {
Version {
new_state: TrustedState,
},
Epoch {
new_state: TrustedState,
latest_epoch_change_li: &'a LedgerInfoWithSignatures,
},
NoChange,
}
Expand description
TrustedStateChange
is the result of attempting to ratchet to a new trusted
state. In order to reduce redundant error checking, TrustedStateChange
also
contains references to relevant items used to ratchet us.
Variants§
Version
Fields
§
new_state: TrustedState
We have a newer TrustedState
but it’s still in the same epoch, so only
the latest trusted version changed.
Epoch
We have a newer TrustedState
and there was at least one epoch change,
so we have a newer trusted version and a newer trusted validator set.
NoChange
The latest ledger info is at the same version as the trusted state and matches the hash.
Implementations§
source§impl<'a> TrustedStateChange<'a>
impl<'a> TrustedStateChange<'a>
pub fn new_state(self) -> Option<TrustedState>
pub fn is_epoch_change(&self) -> bool
pub fn is_no_change(&self) -> bool
Trait Implementations§
source§impl<'a> Clone for TrustedStateChange<'a>
impl<'a> Clone for TrustedStateChange<'a>
source§fn clone(&self) -> TrustedStateChange<'a>
fn clone(&self) -> TrustedStateChange<'a>
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 more