aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-02-04 19:11:24 -0500
committerAndrew Chow <achow101-github@achow101.com>2021-03-24 00:34:54 -0400
commit5fc381e443d6d967e6f7f8bc88a4fd66e18379eb (patch)
treea2f38db1c14e624c32fa92ce30444da8057e4232 /src/wallet/test
parentbcd716670ba8a189a2e9b8b035318abceb9ce631 (diff)
wallet: Move discard feerate fetching to CreateTransaction
Instead of fetching the discard feerate for each SelectCoinsMinConf iteration, fetch and cache it once during CreateTransaction so that it is shared for each SelectCoinsMinConf through coin_selection_params.m_discard_feerate. Does not change behavior. Github-Pull: #21083 Rebased-From: bdd0c2934b7f389ffcfae3b602ee3ecee8581acd
Diffstat (limited to 'src/wallet/test')
-rw-r--r--src/wallet/test/coinselector_tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp
index f375ce02a5..4686ecdf89 100644
--- a/src/wallet/test/coinselector_tests.cpp
+++ b/src/wallet/test/coinselector_tests.cpp
@@ -37,7 +37,7 @@ CoinEligibilityFilter filter_confirmed(1, 1, 0);
CoinEligibilityFilter filter_standard_extra(6, 6, 0);
CoinSelectionParams coin_selection_params(/* use_bnb= */ false, /* change_output_size= */ 0,
/* change_spend_size= */ 0, /* effective_fee= */ CFeeRate(0),
- /* long_term_feerate= */ CFeeRate(0),
+ /* long_term_feerate= */ CFeeRate(0), /* discard_feerate= */ CFeeRate(0),
/* tx_no_inputs_size= */ 0);
static void add_coin(const CAmount& nValue, int nInput, std::vector<CInputCoin>& set)
@@ -267,7 +267,7 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
// Make sure that effective value is working in SelectCoinsMinConf when BnB is used
CoinSelectionParams coin_selection_params_bnb(/* use_bnb= */ true, /* change_output_size= */ 0,
/* change_spend_size= */ 0, /* effective_fee= */ CFeeRate(3000),
- /* long_term_feerate= */ CFeeRate(1000),
+ /* long_term_feerate= */ CFeeRate(1000), /* discard_feerate= */ CFeeRate(1000),
/* tx_no_inputs_size= */ 0);
CoinSet setCoinsRet;
CAmount nValueRet;
@@ -640,11 +640,11 @@ BOOST_AUTO_TEST_CASE(SelectCoins_test)
// Perform selection
CoinSelectionParams coin_selection_params_knapsack(/* use_bnb= */ false, /* change_output_size= */ 34,
/* change_spend_size= */ 148, /* effective_fee= */ CFeeRate(0),
- /* long_term_feerate= */ CFeeRate(0),
+ /* long_term_feerate= */ CFeeRate(0), /* discard_feerate= */ CFeeRate(0),
/* tx_no_inputs_size= */ 0);
CoinSelectionParams coin_selection_params_bnb(/* use_bnb= */ true, /* change_output_size= */ 34,
/* change_spend_size= */ 148, /* effective_fee= */ CFeeRate(0),
- /* long_term_feerate= */ CFeeRate(0),
+ /* long_term_feerate= */ CFeeRate(0), /* discard_feerate= */ CFeeRate(0),
/* tx_no_inputs_size= */ 0);
CoinSet out_set;
CAmount out_value = 0;