mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-15 07:03:40 +01:00
Move CTxInWitness inside CTxIn
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user