aboutsummaryrefslogtreecommitdiff
path: root/src/script/sign.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-08-04 02:49:16 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-12-04 23:47:12 -0800
commitf6fb7acda4aefd01b8ef6cd77063bfc0c4f4ab36 (patch)
tree311a5d4ee2b12057eb6cab17a0226f17cdc53eef /src/script/sign.cpp
parentd04aebaec7bbf4095bd4f6a715eb6ee834857115 (diff)
Move CTxInWitness inside CTxIn
Diffstat (limited to 'src/script/sign.cpp')
-rw-r--r--src/script/sign.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index f552ad5bba..b008df2591 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -194,9 +194,7 @@ SignatureData DataFromTransaction(const CMutableTransaction& tx, unsigned int nI
SignatureData data;
assert(tx.vin.size() > nIn);
data.scriptSig = tx.vin[nIn].scriptSig;
- if (tx.wit.vtxinwit.size() > nIn) {
- data.scriptWitness = tx.wit.vtxinwit[nIn].scriptWitness;
- }
+ data.scriptWitness = tx.vin[nIn].scriptWitness;
return data;
}
@@ -204,10 +202,7 @@ void UpdateTransaction(CMutableTransaction& tx, unsigned int nIn, const Signatur
{
assert(tx.vin.size() > nIn);
tx.vin[nIn].scriptSig = data.scriptSig;
- if (!data.scriptWitness.IsNull() || tx.wit.vtxinwit.size() > nIn) {
- tx.wit.vtxinwit.resize(tx.vin.size());
- tx.wit.vtxinwit[nIn].scriptWitness = data.scriptWitness;
- }
+ tx.vin[nIn].scriptWitness = data.scriptWitness;
}
bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, const CAmount& amount, int nHashType)