Skip to content

Commit 3012b39

Browse files
authored
Merge pull request #710 from evoskuil/master
Style.
2 parents 2693ad9 + 983078f commit 3012b39

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ code CLASS::get_confirmed_balance(std::atomic_bool& cancel, uint64_t& balance,
260260
}
261261

262262
TEMPLATE
263-
std::optional<hash_digest> CLASS::get_interval(header_link link,
263+
std::optional<hash_digest> CLASS::get_interval(const header_link& link,
264264
size_t height) const NOEXCEPT
265265
{
266266
// Interval is enabled by address table.
@@ -283,11 +283,12 @@ std::optional<hash_digest> CLASS::get_interval(header_link link,
283283
return {};
284284

285285
// Generate the leaf nodes for the span.
286+
auto header = link;
286287
hashes leaves(span);
287288
for (auto& leaf: std::views::reverse(leaves))
288289
{
289-
leaf = get_header_key(link);
290-
link = to_parent(link);
290+
leaf = get_header_key(header);
291+
header = to_parent(header);
291292
}
292293

293294
// Generate the interval (merkle root) for the span ending on link header.

include/bitcoin/database/query.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ class query
572572
bool turbo=false) const NOEXCEPT;
573573

574574
/// No value if header is not at configured interval.
575-
std::optional<hash_digest> get_interval(header_link header,
575+
std::optional<hash_digest> get_interval(const header_link& link,
576576
size_t height) const NOEXCEPT;
577577

578578
bool is_filtered_body(const header_link& link) const NOEXCEPT;

0 commit comments

Comments
 (0)