pub enum BlockSyncAdvertiseMessage {
AdvertiseBlock(AdvertiseBlock),
AdvertisePC(AdvertisePC),
}
Expand description
Messages periodically broadcasted by the sync server to update clients about their availability, commitment to providing blocks up to a given height, and knowledge of the latest consensus decision.
Variants§
AdvertiseBlock(AdvertiseBlock)
AdvertisePC(AdvertisePC)
Implementations§
source§impl BlockSyncAdvertiseMessage
impl BlockSyncAdvertiseMessage
pub(crate) fn advertise_block( me: &Keypair, chain_id: ChainID, highest_committed_block_height: BlockHeight, ) -> Self
pub(crate) fn advertise_pc(highest_pc: PhaseCertificate) -> Self
pub fn chain_id(&self) -> ChainID
pub fn size(&self) -> u64
Trait Implementations§
source§impl BorshDeserialize for BlockSyncAdvertiseMessagewhere
AdvertiseBlock: BorshDeserialize,
AdvertisePC: BorshDeserialize,
impl BorshDeserialize for BlockSyncAdvertiseMessagewhere
AdvertiseBlock: BorshDeserialize,
AdvertisePC: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for BlockSyncAdvertiseMessagewhere
AdvertiseBlock: BorshSerialize,
AdvertisePC: BorshSerialize,
impl BorshSerialize for BlockSyncAdvertiseMessagewhere
AdvertiseBlock: BorshSerialize,
AdvertisePC: BorshSerialize,
source§impl Clone for BlockSyncAdvertiseMessage
impl Clone for BlockSyncAdvertiseMessage
source§fn clone(&self) -> BlockSyncAdvertiseMessage
fn clone(&self) -> BlockSyncAdvertiseMessage
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 EnumExt for BlockSyncAdvertiseMessagewhere
AdvertiseBlock: BorshDeserialize,
AdvertisePC: BorshDeserialize,
impl EnumExt for BlockSyncAdvertiseMessagewhere
AdvertiseBlock: BorshDeserialize,
AdvertisePC: BorshDeserialize,
source§impl From<BlockSyncAdvertiseMessage> for Message
impl From<BlockSyncAdvertiseMessage> for Message
source§fn from(value: BlockSyncAdvertiseMessage) -> Self
fn from(value: BlockSyncAdvertiseMessage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BlockSyncAdvertiseMessage
impl RefUnwindSafe for BlockSyncAdvertiseMessage
impl Send for BlockSyncAdvertiseMessage
impl Sync for BlockSyncAdvertiseMessage
impl Unpin for BlockSyncAdvertiseMessage
impl UnwindSafe for BlockSyncAdvertiseMessage
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)