mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Dynamic roundtime detection. (#244)
When consensus is unreliable detect roundtime based on roundtime reported by peers.
This commit is contained in:
@@ -109,6 +109,9 @@ namespace p2p
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Remember the roundtime reported by this peer.
|
||||
session.reported_roundtime = chall.roundtime;
|
||||
|
||||
// Sending the challenge response to the sender.
|
||||
flatbuffers::FlatBufferBuilder fbuf(1024);
|
||||
p2pmsg::create_peer_challenge_response_from_challenge(fbuf, chall.challenge);
|
||||
@@ -153,13 +156,9 @@ namespace p2p
|
||||
const p2pmsg::Peer_Requirement_Announcement_Message *announcement_msg = content->message_as_Peer_Requirement_Announcement_Message();
|
||||
session.need_consensus_msg_forwarding = announcement_msg->need_consensus_msg_forwarding();
|
||||
if (session.need_consensus_msg_forwarding)
|
||||
{
|
||||
LOG_DEBUG << "Consensus message forwaring is required for " << session.display_name();
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG << "Consensus message forwaring is not required for " << session.display_name();
|
||||
}
|
||||
}
|
||||
else if (content_message_type == p2pmsg::Message_Proposal_Message) // message is a proposal message
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user