Skip to content

Commit

Permalink
correct conditions for all versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBrady committed Nov 25, 2024
1 parent b9f2ccf commit 4fbd14d
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/bucket/test/BucketListTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,22 @@ TEST_CASE_VERSIONS("live bucket tombstones expire at bottom level and live "
REQUIRE(e0.nDead != 0);
REQUIRE(e1.nDead != 0);
REQUIRE(e2.nDead == 0);
// Assert that init entries are converted to live entries
// at the lowest level.
REQUIRE(e0.nLive == 0);
REQUIRE(e0.nInitOrArchived != 0);
// But not the level above.
REQUIRE(e1.nInitOrArchived == 0);
if (protocolVersionStartsFrom(
cfg.LEDGER_PROTOCOL_VERSION,
LiveBucket::FIRST_PROTOCOL_SUPPORTING_INITENTRY_AND_METAENTRY))
{
// Assert that init entries are converted to live entries
// at the lowest level.
REQUIRE(e2.nLive == 0);
REQUIRE(e2.nInitOrArchived != 0);
// But not the level above.
REQUIRE(e1.nInitOrArchived == 0);
}
else
{
REQUIRE(e2.nLive != 0);
REQUIRE(e2.nInitOrArchived == 0);
}
});
}

Expand Down

0 comments on commit 4fbd14d

Please sign in to comment.