Improved debug logging for state sync. (#139)

* Added random peer send pubkey extraction.
* Improved debug logs in state serve and state sync.
This commit is contained in:
Ravin Perera
2020-10-27 16:03:34 +05:30
committed by GitHub
parent 3481961aa8
commit 37cc27c5ce
7 changed files with 34 additions and 21 deletions

View File

@@ -173,7 +173,6 @@ namespace p2p
}
else if (content_message_type == p2pmsg::Message_State_Request_Message)
{
// Insert request with lock.
std::scoped_lock<std::mutex> lock(ctx.collected_msgs.state_requests_mutex);
std::string state_request_msg(reinterpret_cast<const char *>(content_ptr), content_size);
@@ -186,7 +185,7 @@ namespace p2p
// Insert state_response with lock.
std::scoped_lock<std::mutex> lock(ctx.collected_msgs.state_responses_mutex);
std::string response(reinterpret_cast<const char *>(content_ptr), content_size);
ctx.collected_msgs.state_responses.push_back(std::move(response));
ctx.collected_msgs.state_responses.push_back(std::make_pair(session.uniqueid, std::move(response)));
}
}
else if (content_message_type == p2pmsg::Message_History_Request_Message) //message is a lcl history request message