diff --git a/include/bitcoin/database/impl/query/consensus/consensus_strong.ipp b/include/bitcoin/database/impl/query/consensus/consensus_strong.ipp index c9479973c..135504265 100644 --- a/include/bitcoin/database/impl/query/consensus/consensus_strong.ipp +++ b/include/bitcoin/database/impl/query/consensus/consensus_strong.ipp @@ -117,7 +117,7 @@ bool CLASS::set_strong(const header_link& link, size_t count, const auto records = possible_narrow_cast(count); auto record = store_.strong_tx.allocate(records); const auto ptr = store_.strong_tx.get_memory(); - const auto end = first_fk + count; + const auto end = first_fk + records; // Contiguous tx links. for (auto fk = first_fk; fk < end; ++fk)