Skip to content

Commit 600b596

Browse files
committed
Style, comments.
1 parent b953f32 commit 600b596

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

include/bitcoin/database/impl/query/network.ipp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,14 @@ CLASS::span CLASS::get_locator_span(const hashes& locator,
104104
TEMPLATE
105105
size_t CLASS::get_fork(const hashes& locator) const NOEXCEPT
106106
{
107-
// Locator is presumed (by convention) to be in order by height.
107+
// Locator is presumed (by convention) to be in reverse order by height.
108108
for (const auto& hash: locator)
109109
{
110110
const auto link = to_header(hash);
111-
const auto height = get_height(link);
111+
if (link.is_terminal())
112+
continue;
112113

114+
const auto height = get_height(link);
113115
table::height::record confirmed{};
114116
if (store_.confirmed.get(height, confirmed) &&
115117
confirmed.header_fk == link)

0 commit comments

Comments
 (0)