mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Access Journal::Stream using member functions (RIPD-1087):
Replace Journal public data members with member function accessors in order to make Journal lighter weight. The change makes a Journal cheaper to pass by value. Also add missing stream checks (e.g., calls to JLOG) to avoid text processing that ultimately will not be stored in the log.
This commit is contained in:
@@ -182,7 +182,7 @@ SHAMapAbstractNode::make(Blob const& rawNode, std::uint32_t seq, SHANodeFormat f
|
||||
{
|
||||
if (rawNode.size () < 4)
|
||||
{
|
||||
JLOG (j.info) << "size < 4";
|
||||
JLOG (j.info()) << "size < 4";
|
||||
Throw<std::runtime_error> ("invalid P node");
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ SHAMapAbstractNode::make(Blob const& rawNode, std::uint32_t seq, SHANodeFormat f
|
||||
|
||||
if (u.isZero ())
|
||||
{
|
||||
JLOG (j.info) << "invalid PLN node";
|
||||
JLOG (j.info()) << "invalid PLN node";
|
||||
Throw<std::runtime_error> ("invalid PLN node");
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ SHAMapAbstractNode::make(Blob const& rawNode, std::uint32_t seq, SHANodeFormat f
|
||||
}
|
||||
else
|
||||
{
|
||||
JLOG (j.info) << "Unknown node prefix " << std::hex << prefix << std::dec;
|
||||
JLOG (j.info()) << "Unknown node prefix " << std::hex << prefix << std::dec;
|
||||
Throw<std::runtime_error> ("invalid node prefix");
|
||||
}
|
||||
}
|
||||
@@ -466,7 +466,7 @@ int SHAMapInnerNode::getBranchCount () const
|
||||
void
|
||||
SHAMapAbstractNode::dump(const SHAMapNodeID & id, beast::Journal journal)
|
||||
{
|
||||
if (journal.debug) journal.debug <<
|
||||
JLOG(journal.debug()) <<
|
||||
"SHAMapTreeNode(" << id.getNodeID () << ")";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user