Simplify and improve order book tracking:

- Avoid using std::shared_ptr
- Prefer using unordered maps to avoid linear searches
- Increase the interval between full order book updates
This commit is contained in:
Nik Bougalis
2021-12-31 21:31:37 -08:00
parent 48803a48af
commit b9903bbcc4
5 changed files with 146 additions and 268 deletions

View File

@@ -3072,7 +3072,8 @@ NetworkOPsImp::pubValidatedTransaction(
it = mStreamMaps[sRTTransactions].erase(it);
}
}
app_.getOrderBookDB().processTxn(alAccepted, alTx, jvObj);
if (alTx.getResult() == tesSUCCESS)
app_.getOrderBookDB().processTxn(alAccepted, alTx, jvObj);
pubAccountTransaction(alAccepted, alTx, true);
}