Skip to content

Commit

Permalink
Guard live -> init conversion with protocol >= 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBrady committed Oct 1, 2024
1 parent 408f816 commit e0781fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bucket/BucketOutputIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ BucketOutputIterator::put(BucketEntry const& e)
return;
}
std::optional<BucketEntry> maybeInitEntry;
if (!mKeepDeadEntries && e.type() == LIVEENTRY)
if (!mKeepDeadEntries && e.type() == LIVEENTRY &&
protocolVersionStartsFrom(
mMeta.ledgerVersion, Bucket::FIRST_PROTOCOL_SUPPORTING_INITENTRY_AND_METAENTRY))
{
// If mKeepDeadEntries is false (lowest level),
// we also want to convert the LIVEENTRY to an INITENTRY.
Expand Down

0 comments on commit e0781fc

Please sign in to comment.