Struct diem_sdk::types::ledger_info::LedgerInfoWithV0 [−][src]
pub struct LedgerInfoWithV0 { /* fields omitted */ }
Expand description
The validator node returns this structure which includes signatures from validators that confirm the state. The client needs to only pass back the LedgerInfo element since the validator node doesn’t need to know the signatures again when the client performs a query, those are only there for the client to be able to verify the state
Implementations
pub fn new(
ledger_info: LedgerInfo,
signatures: BTreeMap<AccountAddress, Ed25519Signature>
) -> LedgerInfoWithV0
pub fn genesis(
genesis_state_root_hash: HashValue,
validator_set: ValidatorSet
) -> LedgerInfoWithV0
pub fn genesis(
genesis_state_root_hash: HashValue,
validator_set: ValidatorSet
) -> LedgerInfoWithV0
Create a new LedgerInfoWithEd25519
at genesis with the given genesis
state and initial validator set.
Note that the genesis LedgerInfoWithEd25519
is unsigned. Validators
and FullNodes are configured with the same genesis transaction and generate
an identical genesis LedgerInfoWithEd25519
independently. In contrast,
Clients will likely use a waypoint generated from the genesis LedgerInfo
.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<LedgerInfoWithV0, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<LedgerInfoWithV0, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for LedgerInfoWithV0
impl Send for LedgerInfoWithV0
impl Sync for LedgerInfoWithV0
impl Unpin for LedgerInfoWithV0
impl UnwindSafe for LedgerInfoWithV0
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Generates a hash used only for tests.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more