Set issuer in balanceHook

This commit is contained in:
seelabs
2016-08-19 16:30:25 -04:00
committed by Nik Bougalis
parent 68e123a8d6
commit cf8b6be494
3 changed files with 21 additions and 0 deletions

View File

@@ -341,6 +341,12 @@ bool amendmentRIPD1141 (NetClock::time_point const closeTime);
NetClock::time_point const& amendmentRIPD1141SoTime ();
bool amendmentRIPD1141 (NetClock::time_point const closeTime);
NetClock::time_point const& amendmentRIPD1274SoTime ();
bool amendmentRIPD1274 (NetClock::time_point const closeTime);
NetClock::time_point const& amendmentRIPD1274SoTime ();
bool amendmentRIPD1274 (NetClock::time_point const closeTime);
} // ripple

View File

@@ -195,6 +195,8 @@ PaymentSandbox::balanceHook (AccountID const& account,
}
}
adjustedAmt = std::min(amount, lastBal - delta);
if (amendmentRIPD1274 (info ().parentCloseTime))
adjustedAmt.setIssuer(amount.getIssuer());
}
else
{

View File

@@ -44,6 +44,19 @@ bool amendmentRIPD1141 (NetClock::time_point const closeTime)
return closeTime > amendmentRIPD1141SoTime();
}
NetClock::time_point const& amendmentRIPD1274SoTime ()
{
using namespace std::chrono_literals;
// Fri Aug 26, 2016 10:00:00am PDT
static NetClock::time_point const soTime{525546000s};
return soTime;
}
bool amendmentRIPD1274 (NetClock::time_point const closeTime)
{
return closeTime > amendmentRIPD1274SoTime();
}
// VFALCO NOTE A copy of the other one for now
/** Maximum number of entries in a directory page
A change would be protocol-breaking.