mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Convert STAmount switchovers to tls (RIPD-1068)
This commit is contained in:
committed by
Edward Hennis
parent
4fb6bf3e67
commit
14dde47173
@@ -147,18 +147,16 @@ public:
|
||||
for (int i=0;i<101;++i)
|
||||
env (offer (carol, USD (1), EUR (2)));
|
||||
|
||||
auto const switchoverTime = STAmountCalcSwitchovers::enableUnderflowFixCloseTime ();
|
||||
|
||||
for (auto timeDelta : {
|
||||
- env.closed()->info().closeTimeResolution,
|
||||
env.closed()->info().closeTimeResolution} )
|
||||
{
|
||||
auto const closeTime = switchoverTime + timeDelta;
|
||||
STAmountCalcSwitchovers switchover (closeTime);
|
||||
auto const closeTime = STAmountSO::soTime + timeDelta;
|
||||
env.close (closeTime);
|
||||
*stAmountCalcSwitchover = closeTime <= STAmountSO::soTime;
|
||||
// Will fail without the underflow fix
|
||||
auto expectedResult = switchover.enableUnderflowFix () ?
|
||||
tesSUCCESS : tecPATH_PARTIAL;
|
||||
auto expectedResult = *stAmountCalcSwitchover ?
|
||||
tesSUCCESS : tecPATH_PARTIAL;
|
||||
env (pay ("alice", "bob", EUR (epsilon)), path (~EUR),
|
||||
sendmax (USD (100)), ter (expectedResult));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user