mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Only update order book DB every ten ledgers
The order book DB code should be change to update on creation of order books rather than rescan.
This commit is contained in:
@@ -25,7 +25,7 @@ void OrderBookDB::setup (Ledger::ref ledger)
|
||||
|
||||
ScopedLockType sl (mLock, __FILE__, __LINE__);
|
||||
|
||||
if (ledger->getLedgerSeq () == mSeq)
|
||||
if ((mSeq != 0) && (ledger->getLedgerSeq () >= mSeq) && ((ledger->getLedgerSeq() - mSeq) < 10))
|
||||
return;
|
||||
|
||||
mSeq = ledger->getLedgerSeq ();
|
||||
|
||||
Reference in New Issue
Block a user