Make CWalletTx store a CTransactionRef instead of inheriting

This commit is contained in:
Pieter Wuille
2016-11-11 16:54:51 -08:00
parent a1883536b4
commit c3f5673a63
12 changed files with 128 additions and 123 deletions

View File

@@ -42,7 +42,7 @@ static void add_coin(const CAmount& nValue, int nAge = 6*24, bool fIsFromMe = fa
// so stop vin being empty, and cache a non-zero Debit to fake out IsFromMe()
tx.vin.resize(1);
}
CWalletTx* wtx = new CWalletTx(&wallet, tx);
CWalletTx* wtx = new CWalletTx(&wallet, MakeTransactionRef(std::move(tx)));
if (fIsFromMe)
{
wtx->fDebitCached = true;