13 std::shared_ptr<network::Router> router)
14 : router_(
std::move(router)) {}
18 auto protocol =
router_->getGrandpaProtocol();
19 BOOST_ASSERT_MSG(protocol,
"Router did not provide grandpa protocol");
20 protocol->neighbor(std::move(message));
25 auto protocol =
router_->getGrandpaProtocol();
26 BOOST_ASSERT_MSG(protocol,
"Router did not provide grandpa protocol");
27 protocol->vote(std::move(message), peer_id);
31 auto protocol =
router_->getGrandpaProtocol();
32 BOOST_ASSERT_MSG(protocol,
"Router did not provide grandpa protocol");
33 protocol->vote(std::move(message), std::nullopt);
38 auto protocol =
router_->getGrandpaProtocol();
39 BOOST_ASSERT_MSG(protocol,
"Router did not provide grandpa protocol");
40 protocol->finalize(std::move(message), peer_id);
44 auto protocol =
router_->getGrandpaProtocol();
45 BOOST_ASSERT_MSG(protocol,
"Router did not provide grandpa protocol");
46 protocol->finalize(std::move(message), std::nullopt);
51 auto protocol =
router_->getGrandpaProtocol();
52 BOOST_ASSERT_MSG(protocol,
"Router did not provide grandpa protocol");
53 protocol->catchUpRequest(peer_id, std::move(message));
58 auto protocol =
router_->getGrandpaProtocol();
59 BOOST_ASSERT_MSG(protocol,
"Router did not provide grandpa protocol");
60 protocol->catchUpResponse(peer_id, std::move(message));
void sendCatchUpResponse(const libp2p::peer::PeerId &peer_id, CatchUpResponse &&message) override
void sendCommitMessage(const libp2p::peer::PeerId &peer_id, FullCommitMessage &&message) override
libp2p::peer::PeerId PeerId
std::shared_ptr< Router > router_
void sendNeighborMessage(GrandpaNeighborMessage &&message) override
void sendVoteMessage(const libp2p::peer::PeerId &peer_id, GrandpaVote &&message) override
GrandpaTransmitterImpl(std::shared_ptr< Router > router)
void sendCatchUpRequest(const libp2p::peer::PeerId &peer_id, CatchUpRequest &&message) override