pub struct Vote {
pub block_hash: BlockHash,
pub view: ViewNumber,
pub validator: ValidatorId,
pub signature: Signature,
pub vote_type: VoteType,
pub extension: Option<Vec<u8>>,
}Fields§
§block_hash: BlockHash§view: ViewNumber§validator: ValidatorId§signature: Signature§vote_type: VoteType§extension: Option<Vec<u8>>Optional vote extension data (ABCI++ Vote Extensions). Only meaningful for Vote2 (second-phase votes).
Implementations§
Source§impl Vote
impl Vote
Sourcepub fn signing_bytes(
chain_id_hash: &[u8; 32],
epoch: EpochNumber,
view: ViewNumber,
block_hash: &BlockHash,
vote_type: VoteType,
) -> Vec<u8> ⓘ
pub fn signing_bytes( chain_id_hash: &[u8; 32], epoch: EpochNumber, view: ViewNumber, block_hash: &BlockHash, vote_type: VoteType, ) -> Vec<u8> ⓘ
Canonical bytes for signing: domain_tag || chain_id_hash || epoch || view || block_hash || vote_type
The domain tag, chain_id_hash, and epoch prevent cross-chain, cross-epoch, and cross-message-type signature replay attacks.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Vote
impl<'de> Deserialize<'de> for Vote
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
Auto Trait Implementations§
impl Freeze for Vote
impl RefUnwindSafe for Vote
impl Send for Vote
impl Sync for Vote
impl Unpin for Vote
impl UnsafeUnpin for Vote
impl UnwindSafe for Vote
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