mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-10 14:48:46 +02:00
Merge bitcoin/bitcoin#35212: [29.x] validation: correct lifetime of precomputed tx data
9ad085bd83validation: correct lifetime of precomputed tx data (Antoine Poinsot) Pull request description: This backports #35209 to the version 29 branch. ACKs for top commit: achow101: ACK9ad085bd83theuni: ACK9ad085bd83Tree-SHA512: e9dd4d43ee348015d3b7b485bef4617c69ad8e0c70589f84a16eb2b1d97bdefd21ce5d72ad6a2d8d25bc90d98f65d53374ca921210cab3b0db773072126459f6
This commit is contained in:
@@ -2615,8 +2615,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