mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
hpfs binary with optimized write fix. (#303)
* Updated hpfs bin. * Improved logs. * Local cluster script log level fix.
This commit is contained in:
@@ -275,7 +275,7 @@ namespace comm
|
||||
/**
|
||||
* Returns printable name for the session based on uniqueid (used for logging).
|
||||
*/
|
||||
const std::string comm_session::display_name()
|
||||
const std::string comm_session::display_name() const
|
||||
{
|
||||
if (challenge_status == comm::CHALLENGE_STATUS::CHALLENGE_VERIFIED)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace comm
|
||||
void mark_for_closure();
|
||||
void close();
|
||||
void mark_as_verified();
|
||||
virtual const std::string display_name();
|
||||
virtual const std::string display_name() const;
|
||||
|
||||
void set_threshold(const SESSION_THRESHOLDS threshold_type, const uint64_t threshold_limit, const uint32_t intervalms);
|
||||
void increment_metric(const SESSION_THRESHOLDS threshold_type, const uint64_t amount);
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace hpfs
|
||||
// Validate received fs data against the hash.
|
||||
if (!validate_fs_entry_hash(vpath, hash, fs_resp.dir_mode(), peer_fs_entries))
|
||||
{
|
||||
LOG_INFO << "Hpfs " << name << " sync: Skipping response from [" << from << "] due to fs entry hash mismatch.";
|
||||
LOG_INFO << "Hpfs " << name << " sync: Skipping mismatched fs entries response from [" << from << "] for " << vpath;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ namespace hpfs
|
||||
// Validate received hashmap against the hash.
|
||||
if (!validate_file_hashmap_hash(vpath, hash, file_resp.file_mode(), block_hashes, block_hash_count))
|
||||
{
|
||||
LOG_INFO << "Hpfs " << name << " sync: Skipping response from [" << from << "] due to file hashmap hash mismatch.";
|
||||
LOG_INFO << "Hpfs " << name << " sync: Skipping mismatched hashmap response from [" << from << "] for " << vpath;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -309,7 +309,8 @@ namespace hpfs
|
||||
// Validate received block data against the hash.
|
||||
if (!validate_file_block_hash(hash, block_id, buf))
|
||||
{
|
||||
LOG_INFO << "Hpfs " << name << " sync: Skipping response from [" << from << "] due to file block hash mismatch.";
|
||||
LOG_INFO << "Hpfs " << name << " sync: Skipping mismatched block response from [" << from << "] for block_id:" << block_id
|
||||
<< " (len:" << buf.length() << ") of " << vpath;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace msg::fbuf::p2pmsg
|
||||
const uint64_t time_now = util::get_epoch_milliseconds();
|
||||
if (p2p_msg->created_on() < (time_now - (conf::cfg.contract.roundtime * 4)))
|
||||
{
|
||||
LOG_DEBUG << "Peer message is too old. type:" << p2p_msg->content_type() << " [" << (session ? session->uniqueid : "") << "]";
|
||||
LOG_DEBUG << "Peer message is too old. type:" << p2p_msg->content_type() << " from:" << (session ? session->display_name() : "");
|
||||
return p2p::peer_message_info{NULL, P2PMsgContent_NONE, 0};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace p2p
|
||||
const uint64_t time_now = util::get_epoch_milliseconds();
|
||||
if (originated_on < (time_now - (conf::cfg.contract.roundtime * 3)))
|
||||
{
|
||||
LOG_DEBUG << "Peer message is too old for forwarding. type:" << msg_type << " [" << session.uniqueid << "]";
|
||||
LOG_DEBUG << "Peer message is too old for forwarding. type:" << msg_type << " from:" << session.display_name();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace p2p
|
||||
if (!recent_peermsg_hashes.try_emplace(crypto::get_hash(message)))
|
||||
{
|
||||
session.increment_metric(comm::SESSION_THRESHOLDS::MAX_DUPMSGS_PER_MINUTE, 1);
|
||||
LOG_DEBUG << "Duplicate peer message. type:" << mi.type << " " << session.display_name() << " [" << session.uniqueid << "]";
|
||||
LOG_DEBUG << "Duplicate peer message. type:" << mi.type << " from:" << session.display_name();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user