From 01a29b69b139d3c8f2635ecdbf39d12ae645e338 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 19 Feb 2024 16:24:51 -0800 Subject: [PATCH] Explain assert --- ConflictSet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index d814f6a..d29aa63 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -1541,6 +1541,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { void setOldestVersion(int64_t oldestVersion) { this->oldestVersion = oldestVersion; Node *prev = firstGeq(root, removalKey).n; + // There's no way to erase removalKey without introducing a key after it assert(prev != nullptr); while (keyUpdates-- > 0) { Node *n = nextLogical(prev);