mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +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:
@@ -199,7 +199,7 @@ XRPEndpointStep::validFwd (
|
||||
{
|
||||
if (!cache_)
|
||||
{
|
||||
JLOG (j_.error) << "Expected valid cache in validFwd";
|
||||
JLOG (j_.error()) << "Expected valid cache in validFwd";
|
||||
return {false, EitherAmount (XRPAmount (beast::zero))};
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ XRPEndpointStep::validFwd (
|
||||
|
||||
if (!isLast_ && balance < xrpIn)
|
||||
{
|
||||
JLOG (j_.error) << "XRPEndpointStep: Strand re-execute check failed."
|
||||
JLOG (j_.error()) << "XRPEndpointStep: Strand re-execute check failed."
|
||||
<< " Insufficient balance: " << to_string (balance)
|
||||
<< " Requested: " << to_string (xrpIn);
|
||||
return {false, EitherAmount (balance)};
|
||||
@@ -218,7 +218,7 @@ XRPEndpointStep::validFwd (
|
||||
|
||||
if (xrpIn != *cache_)
|
||||
{
|
||||
JLOG (j_.error) << "XRPEndpointStep: Strand re-execute check failed."
|
||||
JLOG (j_.error()) << "XRPEndpointStep: Strand re-execute check failed."
|
||||
<< " ExpectedIn: " << to_string (*cache_)
|
||||
<< " CachedIn: " << to_string (xrpIn);
|
||||
}
|
||||
@@ -230,14 +230,14 @@ XRPEndpointStep::check (StrandContext const& ctx) const
|
||||
{
|
||||
if (!acc_)
|
||||
{
|
||||
JLOG (j_.debug) << "XRPEndpointStep: specified bad account.";
|
||||
JLOG (j_.debug()) << "XRPEndpointStep: specified bad account.";
|
||||
return temBAD_PATH;
|
||||
}
|
||||
|
||||
auto sleAcc = ctx.view.read (keylet::account (acc_));
|
||||
if (!sleAcc)
|
||||
{
|
||||
JLOG (j_.warning) << "XRPEndpointStep: can't send or receive XRPs from "
|
||||
JLOG (j_.warn()) << "XRPEndpointStep: can't send or receive XRPs from "
|
||||
"non-existent account: "
|
||||
<< acc_;
|
||||
return terNO_ACCOUNT;
|
||||
|
||||
Reference in New Issue
Block a user