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

@@ -410,9 +410,11 @@ namespace ledger
flatbuffers::FlatBufferBuilder fbuf(1024);
p2pmsg::create_msg_from_history_request(fbuf, hr);
p2p::send_message_to_random_peer(fbuf);
LOG_DEBUG << "Ledger history request sent. Required lcl:" << required_lcl.substr(0, 15);
std::string target_pubkey;
p2p::send_message_to_random_peer(fbuf, target_pubkey);
LOG_DEBUG << "Ledger history requested from [" << target_pubkey.substr(0, 10) << "]. Required lcl:" << required_lcl.substr(0, 15);
}
/**