mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Fix a bug that hides order book liquidity and causes crashes.
This commit is contained in:
@@ -946,7 +946,9 @@ bool LedgerEntrySet::dirNext (
|
||||
STVector256 svIndexes = sleNode->getFieldV256 (sfIndexes);
|
||||
std::vector<uint256>& vuiIndexes = svIndexes.peekValue ();
|
||||
|
||||
if (uDirEntry == vuiIndexes.size ())
|
||||
assert (uDirEntry >= vuiIndexes.size ());
|
||||
|
||||
if (uDirEntry <= vuiIndexes.size ())
|
||||
{
|
||||
uint64 uNodeNext = sleNode->getFieldU64 (sfIndexNext);
|
||||
|
||||
|
||||
@@ -2120,9 +2120,8 @@ void NetworkOPs::getBookPage (Ledger::pointer lpLedger, const uint160& uTakerPay
|
||||
{
|
||||
uTipIndex = sleOfferDir->getIndex ();
|
||||
saDirRate = STAmount::setRate (Ledger::getQuality (uTipIndex));
|
||||
SLE::pointer sleBookNode;
|
||||
|
||||
lesActive.dirFirst (uTipIndex, sleBookNode, uBookEntry, uOfferIndex);
|
||||
lesActive.dirFirst (uTipIndex, sleOfferDir, uBookEntry, uOfferIndex);
|
||||
|
||||
WriteLog (lsTRACE, NetworkOPs) << boost::str (boost::format ("getBookPage: uTipIndex=%s") % uTipIndex);
|
||||
WriteLog (lsTRACE, NetworkOPs) << boost::str (boost::format ("getBookPage: uOfferIndex=%s") % uOfferIndex);
|
||||
|
||||
Reference in New Issue
Block a user