Skip to content

Commit 9c98f99

Browse files
committed
fix: off-by-one: do not ignore the base block which matches the requested block
1 parent 422a695 commit 9c98f99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llmq/snapshot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ uint256 GetLastBaseBlockHash(Span<const CBlockIndex*> baseBlockIndexes, const CB
399399
// default to genesis block
400400
uint256 hash{Params().GenesisBlock().GetHash()};
401401
for (const auto baseBlock : baseBlockIndexes) {
402-
if (baseBlock->nHeight >= blockIndex->nHeight)
402+
if (baseBlock->nHeight > blockIndex->nHeight)
403403
break;
404404
hash = baseBlock->GetBlockHash();
405405
}

0 commit comments

Comments
 (0)