mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Config patch change detection. (#211)
* Applying patch file changes to hpcore runtime after patch file change detection. * Removing unl sync functionality. * Removing subjecting unl changeset to consensus.
This commit is contained in:
committed by
GitHub
parent
c87ae6693d
commit
bed8205ca8
@@ -257,41 +257,6 @@ namespace p2p
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (content_message_type == p2pmsg::Message_Unl_Request_Message) //message is a unl request message.
|
||||
{
|
||||
// Check the cap and insert request with lock.
|
||||
std::scoped_lock<std::mutex> lock(unl::sync_ctx.list_mutex);
|
||||
|
||||
// If max number of unl requests reached skip the rest.
|
||||
if (unl::sync_ctx.collected_unl_sync_requests.size() < unl::UNL_REQ_LIST_CAP)
|
||||
{
|
||||
const p2p::unl_sync_request unl_request = p2pmsg::create_unl_sync_request_from_msg(*content->message_as_Unl_Request_Message());
|
||||
unl::sync_ctx.collected_unl_sync_requests.push_back(std::make_pair(session.pubkey, std::move(unl_request)));
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG << "Unl request rejected. Maximum unl request count reached. " << session.display_name();
|
||||
}
|
||||
}
|
||||
else if (content_message_type == p2pmsg::Message_Unl_Response_Message) //message is a unl response message.
|
||||
{
|
||||
if (unl::sync_ctx.is_syncing) // Only accept unl responses if unl list is syncing.
|
||||
{
|
||||
// Check the cap and insert response with lock.
|
||||
std::scoped_lock<std::mutex> lock(unl::sync_ctx.list_mutex);
|
||||
|
||||
// If max number of unl responses reached skip the rest.
|
||||
if (unl::sync_ctx.collected_unl_sync_responses.size() < unl::UNL_RES_LIST_CAP)
|
||||
{
|
||||
const p2p::unl_sync_response unl_response = p2pmsg::create_unl_sync_response_from_msg(*content->message_as_Unl_Response_Message());
|
||||
unl::sync_ctx.collected_unl_sync_responses.push_back(std::move(unl_response));
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG << "Unl response rejected. Maximum unl response count reached. " << session.display_name();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
session.increment_metric(comm::SESSION_THRESHOLDS::MAX_BADMSGS_PER_MINUTE, 1);
|
||||
|
||||
Reference in New Issue
Block a user