@@ -319,6 +319,10 @@ BOOST_FIXTURE_TEST_SUITE(createtransaction_tests, WalletTestingSetup)
319319
320320 vTxouts.at (0 )._mockupDepthInMainChain = 0 ;
321321
322+ CCoinControl coinControl;
323+ coinControl.fAllowUnconfirmedIsSet = true ;
324+ coinControl.fAllowUnconfirmed = false ;
325+
322326 {
323327 CWalletTx wtx;
324328 CAmount nFeeRet = 0 ;
@@ -327,7 +331,7 @@ BOOST_FIXTURE_TEST_SUITE(createtransaction_tests, WalletTestingSetup)
327331
328332 CReserveKey reservekey (pwalletMain);
329333 pwalletMain->CreateTransaction (vRecipients, wtx, &reservekey, nFeeRet, nChangePosInOut, strFailReason,
330- nullptr , true , 0 , true , vTxouts);
334+ &coinControl , true , 0 , true , vTxouts);
331335
332336 ASSERT_FAILURE (" Insufficient funds" );
333337 }
@@ -342,7 +346,7 @@ BOOST_FIXTURE_TEST_SUITE(createtransaction_tests, WalletTestingSetup)
342346
343347 CReserveKey reservekey (pwalletMain);
344348 pwalletMain->CreateTransaction (vRecipients, wtx, &reservekey, nFeeRet, nChangePosInOut, strFailReason,
345- nullptr , true , 0 , true , vTxouts);
349+ &coinControl , true , 0 , true , vTxouts);
346350
347351 ASSERT_SUCCESS ();
348352 ASSERT_VIN_SIZE (2 );
@@ -423,16 +427,19 @@ BOOST_FIXTURE_TEST_SUITE(createtransaction_tests, WalletTestingSetup)
423427
424428 vTxouts.at (0 )._mockupDepthInMainChain = 0 ;
425429
430+ CCoinControl coinControl;
431+ coinControl.fAllowUnconfirmedIsSet = true ;
432+ coinControl.fAllowUnconfirmed = false ;
433+
426434 {
427- CCoinControl coinControl;
428435 CWalletTx wtx;
429436 CAmount nFeeRet = 0 ;
430437 int nChangePosInOut = -1 ;
431438 std::string strFailReason;
432439
433440 CReserveKey reservekey (pwalletMain);
434441 pwalletMain->CreateTransaction (vRecipients, wtx, &reservekey, nFeeRet, nChangePosInOut, strFailReason,
435- nullptr , true , 0 , true , vTxouts);
442+ &coinControl , true , 0 , true , vTxouts);
436443
437444 ASSERT_FAILURE (" Insufficient funds" );
438445 }
@@ -447,7 +454,7 @@ BOOST_FIXTURE_TEST_SUITE(createtransaction_tests, WalletTestingSetup)
447454
448455 CReserveKey reservekey (pwalletMain);
449456 pwalletMain->CreateTransaction (vRecipients, wtx, &reservekey, nFeeRet, nChangePosInOut, strFailReason,
450- nullptr , true , 0 , true , vTxouts);
457+ &coinControl , true , 0 , true , vTxouts);
451458
452459
453460 ASSERT_SUCCESS ();
@@ -468,7 +475,7 @@ BOOST_FIXTURE_TEST_SUITE(createtransaction_tests, WalletTestingSetup)
468475
469476 CReserveKey reservekey (pwalletMain);
470477 pwalletMain->CreateTransaction (vRecipients, wtx, &reservekey, nFeeRet, nChangePosInOut, strFailReason,
471- nullptr , true , 0 , false , vTxouts);
478+ &coinControl , true , 0 , false , vTxouts);
472479
473480 ASSERT_FAILURE (" Insufficient funds" );
474481 }
@@ -477,7 +484,8 @@ BOOST_FIXTURE_TEST_SUITE(createtransaction_tests, WalletTestingSetup)
477484 BOOST_AUTO_TEST_CASE (change_position) {
478485 ACQUIRE_LOCKS ();
479486
480- std::vector<CTransparentTxout> vTxouts = GetFakeTransparentTxouts ({1 << 17 , 1 << 16 , 1 << 15 , 1 << 14 , 1 << 13 });
487+ std::vector<CTransparentTxout> vTxouts = GetFakeTransparentTxouts ({1 << 17 , 1 << 16 , 1 << 15 , 1 << 14 ,
488+ 1 << 13 });
481489 std::vector<CRecipient> vRecipients = GetFakeRecipients ({1 << 17 , 1 << 13 , 1 << 16 });
482490
483491 {
0 commit comments