From 1074f99bb484277e9b1c0cb8aeac996e7a47a4a0 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Fri, 12 Jun 2026 19:40:04 -0400 Subject: [PATCH] Style. --- include/bitcoin/node/impl/chasers/chaser_organize.ipp | 10 +++++----- src/chasers/chaser_header.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/bitcoin/node/impl/chasers/chaser_organize.ipp b/include/bitcoin/node/impl/chasers/chaser_organize.ipp index 7b46da01..0858a75b 100644 --- a/include/bitcoin/node/impl/chasers/chaser_organize.ipp +++ b/include/bitcoin/node/impl/chasers/chaser_organize.ipp @@ -128,7 +128,7 @@ void CLASS::do_organize(typename Block::cptr block, return; } - const auto it = tree_.find(hash_cref(hash)); + const auto it = tree_.find(hash); if (it != tree_.end()) { handler(error_duplicate(), it->second->get_state()->height()); @@ -518,7 +518,7 @@ code CLASS::push_block(const Block& block, TEMPLATE code CLASS::push_block(const system::hash_digest& key) NOEXCEPT { - const auto handle = tree_.extract(system::hash_cref(key)); + const auto handle = tree_.extract(key); if (!handle) return error::organize15; @@ -534,7 +534,7 @@ void CLASS::cache(const typename Block::cptr& block, block->set_state(state); // TODO: guard cache against memory exhaustion (DoS). - tree_.emplace(system::hash_cref(block->get_hash()), block); + tree_.emplace(block->get_hash(), block); } // Private getters @@ -553,7 +553,7 @@ CLASS::chain_state::cptr CLASS::get_chain_state( return state_; // Previous block may be cached because it is not yet strong. - const auto it = tree_.find(hash_cref(previous_hash)); + const auto it = tree_.find(previous_hash); if (it != tree_.end()) return it->second->get_state(); @@ -583,7 +583,7 @@ bool CLASS::get_branch_work(uint256_t& work, work += head.proof(); // Iterate. - previous = hash_cref(head.previous_block_hash()); + previous = { head.previous_block_hash() }; it = tree_.find(previous); } diff --git a/src/chasers/chaser_header.cpp b/src/chasers/chaser_header.cpp index 343b44b4..75b74033 100644 --- a/src/chasers/chaser_header.cpp +++ b/src/chasers/chaser_header.cpp @@ -206,7 +206,7 @@ bool chaser_header::update_milestone(const system::chain::header& header, // Iterate. const auto& next = get_header(*it->second); - previous = hash_cref(next.previous_block_hash()); + previous = { next.previous_block_hash() }; } // The current active milestone is necessarily on the candidate branch.