diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-02-04 19:11:24 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-03-24 00:34:54 -0400 |
commit | 5fc381e443d6d967e6f7f8bc88a4fd66e18379eb (patch) | |
tree | a2f38db1c14e624c32fa92ce30444da8057e4232 /src/wallet/wallet.h | |
parent | bcd716670ba8a189a2e9b8b035318abceb9ce631 (diff) | |
download | bitcoin-5fc381e443d6d967e6f7f8bc88a4fd66e18379eb.tar.xz |
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/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 65b57396bf..20ee63e4ac 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -608,17 +608,19 @@ struct CoinSelectionParams size_t change_spend_size = 0; CFeeRate effective_fee = CFeeRate(0); CFeeRate m_long_term_feerate; + CFeeRate m_discard_feerate; size_t tx_noinputs_size = 0; //! Indicate that we are subtracting the fee from outputs bool m_subtract_fee_outputs = false; CoinSelectionParams(bool use_bnb, size_t change_output_size, size_t change_spend_size, CFeeRate effective_fee, - CFeeRate long_term_feerate, size_t tx_noinputs_size) : + CFeeRate long_term_feerate, CFeeRate discard_feerate, size_t tx_noinputs_size) : use_bnb(use_bnb), change_output_size(change_output_size), change_spend_size(change_spend_size), effective_fee(effective_fee), m_long_term_feerate(long_term_feerate), + m_discard_feerate(discard_feerate), tx_noinputs_size(tx_noinputs_size) {} CoinSelectionParams() {} |