Struct linera_chain::manager::ChainManagerInfo
source · pub struct ChainManagerInfo {
pub ownership: ChainOwnership,
pub requested_proposed: Option<Box<BlockProposal>>,
pub requested_locked: Option<Box<Certificate>>,
pub timeout: Option<Box<Certificate>>,
pub pending: Option<LiteVote>,
pub timeout_vote: Option<LiteVote>,
pub fallback_vote: Option<LiteVote>,
pub requested_pending_value: Option<Box<HashedCertificateValue>>,
pub current_round: Round,
pub leader: Option<Owner>,
pub round_timeout: Option<Timestamp>,
}
Expand description
Chain manager information that is included in ChainInfo
sent to clients.
Fields§
§ownership: ChainOwnership
The configuration of the chain’s owners.
requested_proposed: Option<Box<BlockProposal>>
Latest authenticated block that we have received, if requested.
requested_locked: Option<Box<Certificate>>
Latest validated proposal that we have voted to confirm (or would have, if we are not a validator).
timeout: Option<Box<Certificate>>
Latest timeout certificate we have seen.
pending: Option<LiteVote>
Latest vote we cast (either to validate or to confirm a block).
timeout_vote: Option<LiteVote>
Latest timeout vote we cast.
fallback_vote: Option<LiteVote>
Fallback vote we cast.
requested_pending_value: Option<Box<HashedCertificateValue>>
The value we voted for, if requested.
current_round: Round
The current round, i.e. the lowest round where we can still vote to validate a block.
leader: Option<Owner>
The current leader, who is allowed to propose the next block.
None
if everyone is allowed to propose.
round_timeout: Option<Timestamp>
The timestamp when the current round times out.
Implementations§
source§impl ChainManagerInfo
impl ChainManagerInfo
sourcepub fn add_values(&mut self, manager: &ChainManager)
pub fn add_values(&mut self, manager: &ChainManager)
Adds requested certificate values and proposals to the ChainManagerInfo
.
sourcepub fn highest_validated(&self) -> Option<&Certificate>
pub fn highest_validated(&self) -> Option<&Certificate>
Returns the highest known validated block certificate.
Trait Implementations§
source§impl Clone for ChainManagerInfo
impl Clone for ChainManagerInfo
source§fn clone(&self) -> ChainManagerInfo
fn clone(&self) -> ChainManagerInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChainManagerInfo
impl Debug for ChainManagerInfo
source§impl Default for ChainManagerInfo
impl Default for ChainManagerInfo
source§fn default() -> ChainManagerInfo
fn default() -> ChainManagerInfo
source§impl<'de> Deserialize<'de> for ChainManagerInfo
impl<'de> Deserialize<'de> for ChainManagerInfo
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>,
source§impl From<&ChainManager> for ChainManagerInfo
impl From<&ChainManager> for ChainManagerInfo
source§fn from(manager: &ChainManager) -> Self
fn from(manager: &ChainManager) -> Self
Auto Trait Implementations§
impl Freeze for ChainManagerInfo
impl RefUnwindSafe for ChainManagerInfo
impl Send for ChainManagerInfo
impl Sync for ChainManagerInfo
impl Unpin for ChainManagerInfo
impl UnwindSafe for ChainManagerInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32 ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8]
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8] ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.