Struct exonum::messages::Prevote [] [src]

pub struct Prevote { /* fields omitted */ }

Pre-vote for a new block.

Validation

A node panics if it has already sent a different Prevote for the same round.

Processing

Pre-vote is added to the list of known votes for the same proposal. If locked_round number from the message is bigger than in a node state, then a node replies with RequestPrevotes. If there are unknown transactions in the propose specified by propose_hash, RequestTransactions is sent in reply. Otherwise if all transactions are known and there are +2/3 pre-votes, then a node is locked to that proposal and Precommit is broadcast.

Generation

A node broadcasts Prevote in response to Propose when it has received all the transactions.

Methods

impl Prevote
[src]

[src]

Creates messsage and sign it.

[src]

Creates message and appends existing signature.

[src]

Returns message_id useable for matching.

[src]

Returns service_id useable for matching.

[src]

The validator id.

[src]

The height to which the message is related.

[src]

The round to which the message is related.

[src]

Hash of the corresponding Propose.

[src]

Locked round.

Trait Implementations

impl Clone for Prevote
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Prevote
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Message for Prevote
[src]

[src]

Returns raw message.

[src]

Returns hash of the RawMessage.

[src]

Verifies the message using given public key.

impl<'a> SegmentField<'a> for Prevote
[src]

[src]

size of item fixed part that this Field collect.

[src]

count of items in collection

[src]

extend buffer with this collection

[src]

create collection from buffer

[src]

check collection data

impl FromRaw for Prevote
[src]

[src]

Converts the raw message into the specific one.

impl StorageValue for Prevote
[src]

[src]

Returns a hash of the value. Read more

[src]

Serialize a value into a vector of bytes.

[src]

Deserialize a value from bytes.

impl Debug for Prevote
[src]

[src]

Formats the value using the given formatter.

impl ExonumJson for Prevote
[src]

[src]

write deserialized field in buffer on place.

[src]

serialize field as json::Value

impl ExonumJsonDeserialize for Prevote
[src]

[src]

deserialize json value.

impl<'de> Deserialize<'de> for Prevote
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Prevote
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl VoteMessage for Prevote
[src]

[src]

Return validator if of the message.