From 1ad5cceec68eb3a4279266999f92cbff88ba0a59 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Fri, 23 Feb 2024 21:33:17 -0500 Subject: [PATCH] Revert block.populate() metadata. --- include/bitcoin/node/chasers/chaser_block.hpp | 1 - src/chasers/chaser_block.cpp | 16 +++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/include/bitcoin/node/chasers/chaser_block.hpp b/include/bitcoin/node/chasers/chaser_block.hpp index 284d86b5..6e298de6 100644 --- a/include/bitcoin/node/chasers/chaser_block.hpp +++ b/include/bitcoin/node/chasers/chaser_block.hpp @@ -105,7 +105,6 @@ class BCN_API chaser_block private: void set_prevout(const system::chain::input& input) const NOEXCEPT; - void do_handle_event(const code& ec, chase event_, link value) NOEXCEPT; // These are thread safe. diff --git a/src/chasers/chaser_block.cpp b/src/chasers/chaser_block.cpp index dfc0d4b3..e3a9c0a7 100644 --- a/src/chasers/chaser_block.cpp +++ b/src/chasers/chaser_block.cpp @@ -171,20 +171,20 @@ void chaser_block::do_organize(const block::cptr& block_ptr, return; } - // Populate prevouts/metadata internal to block. - block.populate(height, state_->median_time_past()); + // Populate prevouts internal to block. + block.populate(); - // Populate prevouts/metadata from block tree. + // Populate prevouts from block tree. populate(block); - // Populate prevouts/metadata from store. + // Populate prevouts from store. if (!query.populate(block)) { handler(network::error::protocol_violation); return; } - // Requires input metadata population. + // Requires only prevout population. error = block.accept(context, coin.subsidy_interval_blocks, coin.initial_subsidy()); if (error) @@ -446,12 +446,6 @@ void chaser_block::set_prevout(const input& input) const NOEXCEPT if (point.index() < outs.size()) { input.prevout = outs.at(point.index()); - input.metadata.height = element.second.context.height; - input.metadata.median_time_past = element.second.context.mtp; - input.metadata.coinbase = tx.is_coinbase(); - - // Spentness is not populated, handled in confirmation chaser. - input.metadata.spent = false; return; } }