Skip to content

Commit e5950e2

Browse files
committedJan 29, 2025
Fix failing tests (wallet/test/spend_tests.cpp)
1 parent acdde37 commit e5950e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/wallet/test/spend_tests.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ BOOST_FIXTURE_TEST_CASE(SubtractFee, TestChain100Setup)
2727
// leftover input amount which would have been change to the recipient
2828
// instead of the miner.
2929
auto check_tx = [&wallet](CAmount leftover_input_amount) {
30-
CRecipient recipient{PubKeyDestination({}), 50 * COIN - leftover_input_amount, /*subtract_fee=*/true};
30+
CRecipient recipient{PubKeyDestination({}), /* Bitgesell genesis is 200 */ 200 * COIN - leftover_input_amount, /*subtract_fee=*/true};
3131
CCoinControl coin_control;
3232
coin_control.m_feerate.emplace(10000);
3333
coin_control.fOverrideFeeRate = true;
@@ -78,7 +78,8 @@ BOOST_FIXTURE_TEST_CASE(wallet_duplicated_preset_inputs_test, TestChain100Setup)
7878
// Try to create a tx that spends more than what preset inputs + wallet selected inputs are covering for.
7979
// The wallet can cover up to 200 BTC, and the tx target is 299 BTC.
8080
std::vector<CRecipient> recipients{{*Assert(wallet->GetNewDestination(OutputType::BECH32, "dummy")),
81-
/*nAmount=*/299 * COIN, /*fSubtractFeeFromAmount=*/true}};
81+
/*nAmount=*/899 * COIN, /*fSubtractFeeFromAmount=*/true}};
82+
// Adjusted the value of nAmount to 899 instead of 299 because Bitgesell genesis is at 200 * COIN while Bitcoin is at 50 * COIN
8283
CCoinControl coin_control;
8384
coin_control.m_allow_other_inputs = true;
8485
for (const auto& outpoint : preset_inputs) {

0 commit comments

Comments
 (0)
Please sign in to comment.