mirror of
https://github.com/XRPLF/clio.git
synced 2026-01-21 07:05:24 +00:00
Simplify backend mock access for unittests (#1062)
This commit is contained in:
@@ -270,6 +270,19 @@ BackendInterface::updateRange(uint32_t newMax)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BackendInterface::setRange(uint32_t min, uint32_t max, bool force)
|
||||
{
|
||||
std::scoped_lock const lck(rngMtx_);
|
||||
|
||||
if (!force) {
|
||||
ASSERT(min <= max, "Range min must be less than or equal to max");
|
||||
ASSERT(not range.has_value(), "Range was already set");
|
||||
}
|
||||
|
||||
range = {min, max};
|
||||
}
|
||||
|
||||
LedgerPage
|
||||
BackendInterface::fetchLedgerPage(
|
||||
std::optional<ripple::uint256> const& cursor,
|
||||
|
||||
Reference in New Issue
Block a user