Merge branch 'ximinez/online-delete-gaps' into ximinez/online-delete-lastrotated

This commit is contained in:
Ed Hennis
2026-04-07 17:11:17 -04:00
committed by GitHub
1250 changed files with 84061 additions and 18524 deletions

View File

@@ -9,7 +9,7 @@ namespace test {
class LedgerMaster_test : public beast::unit_test::suite
{
std::unique_ptr<Config>
static std::unique_ptr<Config>
makeNetworkConfig(uint32_t networkID)
{
using namespace jtx;
@@ -52,14 +52,14 @@ class LedgerMaster_test : public beast::unit_test::suite
// test invalid range
{
std::uint32_t ledgerSeq = -1;
std::uint32_t txnIndex = 0;
std::uint32_t const ledgerSeq = -1;
std::uint32_t const txnIndex = 0;
auto result = env.app().getLedgerMaster().txnIdFromIndex(ledgerSeq, txnIndex);
BEAST_EXPECT(!result);
}
// test not in ledger
{
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
uint32_t const txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(0, txnIndex);
BEAST_EXPECT(!result);
}
@@ -70,15 +70,16 @@ class LedgerMaster_test : public beast::unit_test::suite
}
// ended without result
{
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
uint32_t const txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(endLegSeq + 1, txnIndex);
BEAST_EXPECT(!result);
}
// success (first tx)
{
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
uint32_t const txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(startLegSeq, txnIndex);
BEAST_EXPECT(
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
*result ==
uint256(
"277F4FD89C20B92457FEF05FF63F6405563AD0563C73D967A29727"
@@ -86,9 +87,10 @@ class LedgerMaster_test : public beast::unit_test::suite
}
// success (second tx)
{
uint32_t txnIndex = metas[1]->getFieldU32(sfTransactionIndex);
uint32_t const txnIndex = metas[1]->getFieldU32(sfTransactionIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(startLegSeq + 1, txnIndex);
BEAST_EXPECT(
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
*result ==
uint256(
"293DF7335EBBAF4420D52E70ABF470EB4C5792CAEA2F91F76193C2"