Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions include/bitcoin/database/impl/query/network.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ CLASS::span CLASS::get_locator_span(const hashes& locator,
TEMPLATE
size_t CLASS::get_fork(const hashes& locator) const NOEXCEPT
{
// Locator is presumed (by convention) to be in order by height.
// Locator is presumed (by convention) to be in reverse order by height.
for (const auto& hash: locator)
{
const auto link = to_header(hash);
const auto height = get_height(link);
if (link.is_terminal())
continue;

const auto height = get_height(link);
table::height::record confirmed{};
if (store_.confirmed.get(height, confirmed) &&
confirmed.header_fk == link)
Expand Down
Loading
Loading