From d7c19340ccd4251374783eb281f2f6cdf8dbe63d Mon Sep 17 00:00:00 2001 From: evoskuil Date: Mon, 26 Feb 2024 11:38:08 -0500 Subject: [PATCH 1/2] Remove extraneous comma. --- include/bitcoin/database/impl/query/initialize.ipp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bitcoin/database/impl/query/initialize.ipp b/include/bitcoin/database/impl/query/initialize.ipp index c07afc63..12614a5e 100644 --- a/include/bitcoin/database/impl/query/initialize.ipp +++ b/include/bitcoin/database/impl/query/initialize.ipp @@ -87,7 +87,7 @@ context_map CLASS::get_all_unassociated_above(size_t height) const NOEXCEPT context.ctx.flags, context.timestamp, context.ctx.mtp, - system::possible_wide_cast(context.ctx.height), + system::possible_wide_cast(context.ctx.height) ////// HACK: overloading minimum_block_version (unused). ////header_fk From 363e2eff74ad0da467cf475af8b486211c2ec3c9 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Mon, 26 Feb 2024 14:04:34 -0500 Subject: [PATCH 2/2] Style. --- include/bitcoin/database/impl/query/initialize.ipp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/bitcoin/database/impl/query/initialize.ipp b/include/bitcoin/database/impl/query/initialize.ipp index 12614a5e..c2f8ec38 100644 --- a/include/bitcoin/database/impl/query/initialize.ipp +++ b/include/bitcoin/database/impl/query/initialize.ipp @@ -74,12 +74,12 @@ context_map CLASS::get_all_unassociated_above(size_t height) const NOEXCEPT { context_map out{}; const auto top = get_top_candidate(); - table::header::get_check_context context{}; - while (height < top) + while (++height <= top) { - const auto header_fk = to_candidate(++height); + const auto header_fk = to_candidate(height); if (!is_associated(header_fk)) { + table::header::get_check_context context{}; if (store_.header.get(header_fk, context)) { out.emplace(context.key, system::chain::context