Skip to content

Commit 96fb8f5

Browse files
Store hash_genesis_block in PrecomputedTransactionData.
This will be used by Simplicity.
1 parent 50916cf commit 96fb8f5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/script/interpreter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,8 @@ template PrecomputedTransactionData::PrecomputedTransactionData(const CTransacti
26142614
template PrecomputedTransactionData::PrecomputedTransactionData(const CMutableTransaction& txTo);
26152615

26162616
PrecomputedTransactionData::PrecomputedTransactionData(const uint256& hash_genesis_block)
2617-
: m_tapsighash_hasher(CHashWriter(HASHER_TAPSIGHASH_ELEMENTS) << hash_genesis_block << hash_genesis_block) {}
2617+
: m_hash_genesis_block(hash_genesis_block)
2618+
, m_tapsighash_hasher(CHashWriter(HASHER_TAPSIGHASH_ELEMENTS) << hash_genesis_block << hash_genesis_block) {}
26182619

26192620
static bool HandleMissingData(MissingDataBehavior mdb)
26202621
{

src/script/interpreter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ struct PrecomputedTransactionData
195195
bool m_spent_outputs_ready = false;
196196

197197
//! ELEMENTS: parent genesis hash
198+
const uint256 m_hash_genesis_block;
198199
CHashWriter m_tapsighash_hasher;
199200

200201
explicit PrecomputedTransactionData(const uint256& hash_genesis_block);

0 commit comments

Comments
 (0)