Merge #8589: Inline CTxInWitness inside CTxIn

f6fb7ac Move CTxInWitness inside CTxIn (Pieter Wuille)
This commit is contained in:
Wladimir J. van der Laan
2016-12-21 14:04:03 +01:00
18 changed files with 96 additions and 176 deletions

View File

@@ -2312,7 +2312,6 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
nChangePosInOut = nChangePosRequest;
txNew.vin.clear();
txNew.vout.clear();
txNew.wit.SetNull();
wtxNew.fFromMe = true;
bool fFirst = true;
@@ -2503,9 +2502,10 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
// Remove scriptSigs if we used dummy signatures for fee calculation
if (!sign) {
BOOST_FOREACH (CTxIn& vin, txNew.vin)
BOOST_FOREACH (CTxIn& vin, txNew.vin) {
vin.scriptSig = CScript();
txNew.wit.SetNull();
vin.scriptWitness.SetNull();
}
}
// Embed the constructed transaction data in wtxNew.