mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-16 17:48:59 +02:00
Merge bitcoin/bitcoin#35213: [28.x] validation: correct lifetime of precomputed tx data
076629a3c1validation: correct lifetime of precomputed tx data (Antoine Poinsot) Pull request description: This backports #35209 to the version 28 branch. ACKs for top commit: achow101: ACK076629a3c1Tree-SHA512: b8fbf38a80c82abc1648446b05d15f1e04d3f067a50d583074d969ff5a509272691c4c469217e14d86245f63de1ae78efa7bf66c2dd031895373419be155d4e3
This commit is contained in:
@@ -2603,8 +2603,8 @@ bool Chainstate::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
||||
// in multiple threads). Preallocate the vector size so a new allocation
|
||||
// doesn't invalidate pointers into the vector, and keep txsdata in scope
|
||||
// for as long as `control`.
|
||||
CCheckQueueControl<CScriptCheck> control(fScriptChecks && parallel_script_checks ? &m_chainman.GetCheckQueue() : nullptr);
|
||||
std::vector<PrecomputedTransactionData> txsdata(block.vtx.size());
|
||||
CCheckQueueControl<CScriptCheck> control(fScriptChecks && parallel_script_checks ? &m_chainman.GetCheckQueue() : nullptr);
|
||||
|
||||
std::vector<int> prevheights;
|
||||
CAmount nFees = 0;
|
||||
|
||||
Reference in New Issue
Block a user