Kagome
Polkadot Runtime Engine in C++17
kagome::consensus::grandpa::VoteCryptoProviderImpl Class Reference

#include <vote_crypto_provider_impl.hpp>

Inheritance diagram for kagome::consensus::grandpa::VoteCryptoProviderImpl:
Collaboration diagram for kagome::consensus::grandpa::VoteCryptoProviderImpl:

Public Member Functions

 ~VoteCryptoProviderImpl () override=default
 
 VoteCryptoProviderImpl (const std::shared_ptr< crypto::Ed25519Keypair > &keypair, std::shared_ptr< crypto::Ed25519Provider > ed_provider, RoundNumber round_number, std::shared_ptr< VoterSet > voter_set)
 
bool verifyPrimaryPropose (const SignedMessage &primary_propose) const override
 
bool verifyPrevote (const SignedMessage &prevote) const override
 
bool verifyPrecommit (const SignedMessage &precommit) const override
 
std::optional< SignedMessagesignPrimaryPropose (const PrimaryPropose &primary_propose) const override
 
std::optional< SignedMessagesignPrevote (const Prevote &prevote) const override
 
std::optional< SignedMessagesignPrecommit (const Precommit &precommit) const override
 
- Public Member Functions inherited from kagome::consensus::grandpa::VoteCryptoProvider
virtual ~VoteCryptoProvider ()=default
 

Private Member Functions

std::optional< SignedMessagesign (Vote vote) const
 
bool verify (const SignedMessage &vote, RoundNumber number) const
 

Private Attributes

const std::shared_ptr< crypto::Ed25519Keypair > & keypair_
 
std::shared_ptr< crypto::Ed25519Providered_provider_
 
const RoundNumber round_number_
 
std::shared_ptr< VoterSetvoter_set_
 

Detailed Description

Definition at line 15 of file vote_crypto_provider_impl.hpp.

Constructor & Destructor Documentation

kagome::consensus::grandpa::VoteCryptoProviderImpl::~VoteCryptoProviderImpl ( )
overridedefault
kagome::consensus::grandpa::VoteCryptoProviderImpl::VoteCryptoProviderImpl ( const std::shared_ptr< crypto::Ed25519Keypair > &  keypair,
std::shared_ptr< crypto::Ed25519Provider ed_provider,
RoundNumber  round_number,
std::shared_ptr< VoterSet voter_set 
)

Definition at line 13 of file vote_crypto_provider_impl.cpp.

Member Function Documentation

std::optional< SignedMessage > kagome::consensus::grandpa::VoteCryptoProviderImpl::sign ( Vote  vote) const
private

Definition at line 23 of file vote_crypto_provider_impl.cpp.

std::optional< SignedMessage > kagome::consensus::grandpa::VoteCryptoProviderImpl::signPrecommit ( const Precommit precommit) const
overridevirtual
std::optional< SignedMessage > kagome::consensus::grandpa::VoteCryptoProviderImpl::signPrevote ( const Prevote prevote) const
overridevirtual
std::optional< SignedMessage > kagome::consensus::grandpa::VoteCryptoProviderImpl::signPrimaryPropose ( const PrimaryPropose primary_propose) const
overridevirtual
bool kagome::consensus::grandpa::VoteCryptoProviderImpl::verify ( const SignedMessage vote,
RoundNumber  number 
) const
private

Definition at line 34 of file vote_crypto_provider_impl.cpp.

bool kagome::consensus::grandpa::VoteCryptoProviderImpl::verifyPrecommit ( const SignedMessage precommit) const
overridevirtual
bool kagome::consensus::grandpa::VoteCryptoProviderImpl::verifyPrevote ( const SignedMessage prevote) const
overridevirtual
bool kagome::consensus::grandpa::VoteCryptoProviderImpl::verifyPrimaryPropose ( const SignedMessage primary_propose) const
overridevirtual

Member Data Documentation

std::shared_ptr<crypto::Ed25519Provider> kagome::consensus::grandpa::VoteCryptoProviderImpl::ed_provider_
private

Definition at line 42 of file vote_crypto_provider_impl.hpp.

const std::shared_ptr<crypto::Ed25519Keypair>& kagome::consensus::grandpa::VoteCryptoProviderImpl::keypair_
private

Definition at line 41 of file vote_crypto_provider_impl.hpp.

const RoundNumber kagome::consensus::grandpa::VoteCryptoProviderImpl::round_number_
private

Definition at line 43 of file vote_crypto_provider_impl.hpp.

std::shared_ptr<VoterSet> kagome::consensus::grandpa::VoteCryptoProviderImpl::voter_set_
private

Definition at line 44 of file vote_crypto_provider_impl.hpp.


The documentation for this class was generated from the following files: