mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-22 12:45:52 +00:00
return null when successor not in object table (#142)
* return null when successor not in object table
This commit is contained in:
@@ -140,7 +140,9 @@ BackendInterface::fetchSuccessorObject(
|
||||
if (succ)
|
||||
{
|
||||
auto obj = fetchLedgerObject(*succ, ledgerSequence, yield);
|
||||
assert(obj);
|
||||
if (!obj)
|
||||
return {{*succ, {}}};
|
||||
|
||||
return {{*succ, *obj}};
|
||||
}
|
||||
return {};
|
||||
@@ -176,7 +178,7 @@ BackendInterface::fetchBookOffers(
|
||||
auto mid2 = std::chrono::system_clock::now();
|
||||
numSucc++;
|
||||
succMillis += getMillis(mid2 - mid1);
|
||||
if (!offerDir || offerDir->key > bookEnd)
|
||||
if (!offerDir || offerDir->key >= bookEnd)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(debug) << __func__ << " - offerDir.has_value() "
|
||||
<< offerDir.has_value() << " breaking";
|
||||
|
||||
Reference in New Issue
Block a user