mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Some nicer logging.
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
|
||||
std::string SHAMapNode::getString() const
|
||||
{
|
||||
if ((mDepth == 0) && (mNodeID.isZero()))
|
||||
return "NodeID(root)";
|
||||
|
||||
return str(boost::format("NodeID(%s,%s)")
|
||||
% boost::lexical_cast<std::string>(mDepth)
|
||||
% mNodeID.GetHex());
|
||||
@@ -507,4 +510,16 @@ bool SHAMapTreeNode::setChildHash(int m, const uint256 &hash)
|
||||
return updateHash();
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const SHAMapMissingNode& mn)
|
||||
{
|
||||
if (mn.getMapType() == smtTRANSACTION)
|
||||
out << "Missing/TXN(" << mn.getNodeID() << ")";
|
||||
else if (mn.getMapType() == smtSTATE)
|
||||
out << "Missing/STA(" << mn.getNodeID() << ")";
|
||||
else
|
||||
out << "Missing/" << mn.getNodeID();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user