[][src]Struct casper_node::types::FinalitySignature

pub struct FinalitySignature {
    pub block_hash: BlockHash,
    pub era_id: EraId,
    pub signature: Signature,
    pub public_key: PublicKey,
}

A validator's signature of a block, to confirm it is finalized. Clients and joining nodes should wait until the signers' combined weight exceeds their fault tolerance threshold before accepting the block as finalized.

Fields

block_hash: BlockHash

Hash of a block this signature is for.

era_id: EraId

Era in which the block was created in.

signature: Signature

Signature over the block hash.

public_key: PublicKey

Public key of the signing validator.

Implementations

impl FinalitySignature[src]

pub fn new(
    block_hash: BlockHash,
    era_id: EraId,
    secret_key: &SecretKey,
    public_key: PublicKey,
    rng: &mut NodeRng
) -> Self
[src]

Create an instance of FinalitySignature.

pub fn verify(&self) -> Result<()>[src]

Verifies whether the signature is correct.

Trait Implementations

impl Clone for FinalitySignature[src]

impl DataSize for FinalitySignature[src]

impl Debug for FinalitySignature[src]

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

impl Display for FinalitySignature[src]

impl Eq for FinalitySignature[src]

impl PartialEq<FinalitySignature> for FinalitySignature[src]

impl Serialize for FinalitySignature[src]

impl StructuralEq for FinalitySignature[src]

impl StructuralPartialEq for FinalitySignature[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]