aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2019-04-02 13:12:08 -0700
committerJohn Newbery <john@johnnewbery.com>2020-04-11 21:32:45 -0400
commitf63dec189c3c8eee1ab2187681d5d0b2513b1b2e (patch)
tree89abc0538b185209bf5b338d6b19b7da760d225f /src/script/interpreter.h
parent5504703a9f8388dff66d33bd077bcc4c82dff6c8 (diff)
downloadbitcoin-f63dec189c3c8eee1ab2187681d5d0b2513b1b2e.tar.xz
[REFACTOR] Initialize PrecomputedTransactionData in CheckInputScripts
Add a default constructor to `PrecomputedTransactionData`, which doesn't initialize the struct's members. Instead they're initialized inside the `CheckInputScripts()` function. This allows a later commit to add the spent UTXOs to that structure.
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r--src/script/interpreter.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 2b104a608c..71f2436369 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -121,7 +121,12 @@ bool CheckSignatureEncoding(const std::vector<unsigned char> &vchSig, unsigned i
struct PrecomputedTransactionData
{
uint256 hashPrevouts, hashSequence, hashOutputs;
- bool ready = false;
+ bool m_ready = false;
+
+ PrecomputedTransactionData() = default;
+
+ template <class T>
+ void Init(const T& tx);
template <class T>
explicit PrecomputedTransactionData(const T& tx);