Peer message forwarding. (#133)

This commit is contained in:
Savinda Senevirathne
2020-10-19 10:44:31 +05:30
committed by GitHub
parent 7183383ab7
commit 4f6ff4fbef
5 changed files with 67 additions and 9 deletions

View File

@@ -74,6 +74,12 @@ namespace p2p
}
const p2pmsg::Message content_message_type = content->message_type(); //i.e - proposal, npl, state request, state response, etc
// Check whether the message is qualified for forwarding.
if (p2p::validate_for_peer_msg_forwarding(session, container, content_message_type))
{
// Forward message to peers.
p2p::broadcast_message(message, false, &session);
}
if (content_message_type == p2pmsg::Message_Peer_Challenge_Message) // message is a peer challenge announcement
{