Fix some account_tx issues: (RIPD-1035)

* Sanely handled specified ledger in account_tx
* Reject un-validated ledger in account_tx
* Wait to publish a ledger until it's indexed
* Add unit test for PendingSaves
This commit is contained in:
JoelKatz
2015-09-28 16:29:11 -07:00
committed by Nik Bougalis
parent caa4ed31de
commit 5ee94f8928
11 changed files with 202 additions and 36 deletions

View File

@@ -480,12 +480,12 @@ public:
// Best effort for remaining exclusions
for(auto v : pendingSaves)
{
if ((v >= minVal) && (v <= maxVal))
if ((v.first >= minVal) && (v.first <= maxVal))
{
if (v > ((minVal + maxVal) / 2))
maxVal = v - 1;
if (v.first > ((minVal + maxVal) / 2))
maxVal = v.first - 1;
else
minVal = v + 1;
minVal = v.first + 1;
}
}