mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-23 13:15:51 +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)
|
if (succ)
|
||||||
{
|
{
|
||||||
auto obj = fetchLedgerObject(*succ, ledgerSequence, yield);
|
auto obj = fetchLedgerObject(*succ, ledgerSequence, yield);
|
||||||
assert(obj);
|
if (!obj)
|
||||||
|
return {{*succ, {}}};
|
||||||
|
|
||||||
return {{*succ, *obj}};
|
return {{*succ, *obj}};
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
@@ -176,7 +178,7 @@ BackendInterface::fetchBookOffers(
|
|||||||
auto mid2 = std::chrono::system_clock::now();
|
auto mid2 = std::chrono::system_clock::now();
|
||||||
numSucc++;
|
numSucc++;
|
||||||
succMillis += getMillis(mid2 - mid1);
|
succMillis += getMillis(mid2 - mid1);
|
||||||
if (!offerDir || offerDir->key > bookEnd)
|
if (!offerDir || offerDir->key >= bookEnd)
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(debug) << __func__ << " - offerDir.has_value() "
|
BOOST_LOG_TRIVIAL(debug) << __func__ << " - offerDir.has_value() "
|
||||||
<< offerDir.has_value() << " breaking";
|
<< offerDir.has_value() << " breaking";
|
||||||
|
|||||||
Reference in New Issue
Block a user