tests: Use MakeUnique to construct objects owned by unique_ptrs

This commit is contained in:
practicalswift committed 2018-09-21 11:03:21 +02:00
1 parent 8f464549c4
commit b6718e373e
9 files changed
+20 -15

No files matched your search

+1 -1
View File
@@ -65,7 +65,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);
}
std::unique_ptr<CWalletTx> wtx(new CWalletTx(&testWallet, MakeTransactionRef(std::move(tx))));
std::unique_ptr<CWalletTx> wtx = MakeUnique<CWalletTx>(&testWallet, MakeTransactionRef(std::move(tx)));
if (fIsFromMe)
{
wtx->fDebitCached = true;