Skip to content

Commit

Permalink
Log Validator Lists received from peers
Browse files Browse the repository at this point in the history
  • Loading branch information
ximinez committed Aug 9, 2024
1 parent c19a88f commit f7b9bc5
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions src/xrpld/overlay/detail/PeerImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1949,9 +1949,8 @@ PeerImp::onValidatorListMessage(

auto const hash = sha512Half(manifest, blobs, version);

JLOG(p_journal_.debug())
<< "Received " << messageType << " from " << remote_address_.to_string()
<< " (" << id_ << ")";
JLOG(p_journal_.debug()) << "Received " << messageType << " from "
<< remote_address_.to_string();

if (!app_.getHashRouter().addSuppressionPeer(hash, id_))
{
Expand All @@ -1964,6 +1963,24 @@ PeerImp::onValidatorListMessage(
return;
}

{
JLOG(p_journal_.debug()) << "Manifest: " << base64_decode(manifest);
JLOG(p_journal_.debug()) << "Version: " << version;
JLOG(p_journal_.debug()) << "Hash: " << hash;
std::size_t count = 1;
for (auto const& blob : blobs)
{
JLOG(p_journal_.debug())
<< "Blob " << count << " Signature: " << blob.signature;
JLOG(p_journal_.debug())
<< "Blob " << count << " blob: " << base64_decode(blob.blob);
JLOG(p_journal_.debug())
<< "Blob " << count << " manifest: "
<< (blob.manifest ? base64_decode(*blob.manifest) : "NONE");
++count;
}
}

auto const applyResult = app_.validators().applyListsAndBroadcast(
manifest,
version,
Expand Down Expand Up @@ -2101,7 +2118,7 @@ PeerImp::onValidatorListMessage(
break;
case ListDisposition::stale:
JLOG(p_journal_.warn())
<< "Ignored " << count << "stale " << messageType
<< "Ignored " << count << " stale " << messageType
<< "(s) from peer " << remote_address_;
break;
case ListDisposition::untrusted:
Expand All @@ -2111,12 +2128,12 @@ PeerImp::onValidatorListMessage(
break;
case ListDisposition::unsupported_version:
JLOG(p_journal_.warn())
<< "Ignored " << count << "unsupported version "
<< "Ignored " << count << " unsupported version "
<< messageType << "(s) from peer " << remote_address_;
break;
case ListDisposition::invalid:
JLOG(p_journal_.warn())
<< "Ignored " << count << "invalid " << messageType
<< "Ignored " << count << " invalid " << messageType
<< "(s) from peer " << remote_address_;
break;
default:
Expand Down

0 comments on commit f7b9bc5

Please sign in to comment.