diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 8fb2de2..9636073 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -808,21 +808,22 @@ bool checkPointRead(Node *n, const std::span key, assert(c >= 0); n = getChildExists(n, c); goto downLeftSpine; - } else { - int c = getChildGeq(n, remaining[0]); - if (c == remaining[0]) { + } + + int c = getChildGeq(n, remaining[0]); + if (c != remaining[0]) { + if (c >= 0) { n = getChildExists(n, c); - remaining = remaining.subspan(1, remaining.size() - 1); + goto downLeftSpine; } else { - if (c >= 0) { - n = getChildExists(n, c); - goto downLeftSpine; - } else { - n = nextSibling(n); - goto downLeftSpine; - } + n = nextSibling(n); + goto downLeftSpine; } } + + n = getChildExists(n, c); + remaining = remaining.subspan(1, remaining.size() - 1); + if (n->partialKeyLen > 0) { int commonLen = std::min(n->partialKeyLen, remaining.size()); int i = longestCommonPrefix(n->partialKey, remaining.data(), commonLen);