Skip to content

Commit

Permalink
Revert block.populate() metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Feb 24, 2024
1 parent 3d9b925 commit 1ad5cce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion include/bitcoin/node/chasers/chaser_block.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 5 additions & 11 deletions src/chasers/chaser_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 1ad5cce

Please sign in to comment.