6 #ifndef KAGOME_CORE_CONSENSUS_GRANDPA_IMPL_VOTE_CRYPTO_PROVIDER_IMPL_HPP 7 #define KAGOME_CORE_CONSENSUS_GRANDPA_IMPL_VOTE_CRYPTO_PROVIDER_IMPL_HPP 20 const std::shared_ptr<crypto::Ed25519Keypair> &keypair,
21 std::shared_ptr<crypto::Ed25519Provider> ed_provider,
23 std::shared_ptr<VoterSet> voter_set);
33 const Prevote &prevote)
const override;
35 const Precommit &precommit)
const override;
38 std::optional<SignedMessage>
sign(
Vote vote)
const;
41 const std::shared_ptr<crypto::Ed25519Keypair> &
keypair_;
49 #endif // KAGOME_CORE_CONSENSUS_GRANDPA_IMPL_VOTE_CRYPTO_PROVIDER_IMPL_HPP bool verifyPrevote(const SignedMessage &prevote) const override
bool verify(const SignedMessage &vote, RoundNumber number) const
std::optional< SignedMessage > sign(Vote vote) const
std::shared_ptr< VoterSet > voter_set_
boost::variant< Prevote, Precommit, PrimaryPropose > Vote
Note: order of types in variant matters.
bool verifyPrecommit(const SignedMessage &precommit) const override
std::optional< SignedMessage > signPrimaryPropose(const PrimaryPropose &primary_propose) const override
~VoteCryptoProviderImpl() override=default
const RoundNumber round_number_
bool verifyPrimaryPropose(const SignedMessage &primary_propose) const override
std::optional< SignedMessage > signPrevote(const Prevote &prevote) const override
const std::shared_ptr< crypto::Ed25519Keypair > & keypair_
VoteCryptoProviderImpl(const std::shared_ptr< crypto::Ed25519Keypair > &keypair, std::shared_ptr< crypto::Ed25519Provider > ed_provider, RoundNumber round_number, std::shared_ptr< VoterSet > voter_set)
std::shared_ptr< crypto::Ed25519Provider > ed_provider_
std::optional< SignedMessage > signPrecommit(const Precommit &precommit) const override