Merge commit '1ae475e724' into ximinez/online-delete-lastrotated

* commit '1ae475e724':
  chore: Set ColumnLimit to 120 in clang-format (6288)
This commit is contained in:
Ed Hennis
2026-01-28 18:15:30 -05:00
1016 changed files with 26912 additions and 66650 deletions

View File

@@ -44,8 +44,7 @@ class LedgerMaster_test : public beast::unit_test::suite
env(noop(alice));
txns.emplace_back(env.tx());
env.close();
metas.emplace_back(
env.closed()->txRead(env.tx()->getTransactionID()).second);
metas.emplace_back(env.closed()->txRead(env.tx()->getTransactionID()).second);
}
// add last (empty) ledger
env.close();
@@ -55,35 +54,30 @@ class LedgerMaster_test : public beast::unit_test::suite
{
std::uint32_t ledgerSeq = -1;
std::uint32_t txnIndex = 0;
auto result =
env.app().getLedgerMaster().txnIdFromIndex(ledgerSeq, txnIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(ledgerSeq, txnIndex);
BEAST_EXPECT(!result);
}
// test not in ledger
{
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
auto result =
env.app().getLedgerMaster().txnIdFromIndex(0, txnIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(0, txnIndex);
BEAST_EXPECT(!result);
}
// test empty ledger
{
auto result =
env.app().getLedgerMaster().txnIdFromIndex(endLegSeq, 0);
auto result = env.app().getLedgerMaster().txnIdFromIndex(endLegSeq, 0);
BEAST_EXPECT(!result);
}
// ended without result
{
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(
endLegSeq + 1, txnIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(endLegSeq + 1, txnIndex);
BEAST_EXPECT(!result);
}
// success (first tx)
{
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(
startLegSeq, txnIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(startLegSeq, txnIndex);
BEAST_EXPECT(
*result ==
uint256("277F4FD89C20B92457FEF05FF63F6405563AD0563C73D967A29727"
@@ -92,8 +86,7 @@ class LedgerMaster_test : public beast::unit_test::suite
// success (second tx)
{
uint32_t txnIndex = metas[1]->getFieldU32(sfTransactionIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(
startLegSeq + 1, txnIndex);
auto result = env.app().getLedgerMaster().txnIdFromIndex(startLegSeq + 1, txnIndex);
BEAST_EXPECT(
*result ==
uint256("293DF7335EBBAF4420D52E70ABF470EB4C5792CAEA2F91F76193C2"