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-16 16:33:27 -0400 |
commit | bdd0c2934b7f389ffcfae3b602ee3ecee8581acd (patch) | |
tree | a48ef0b6fe83b44d6ac3a366e85754f803645256 /src/wallet/wallet.h | |
parent | 448d04b931f86941903e855f831249ff5ec77485 (diff) | |
download | bitcoin-bdd0c2934b7f389ffcfae3b602ee3ecee8581acd.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.
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 67d51de30f..e1a567989f 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -608,18 +608,20 @@ 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; bool m_avoid_partial_spends = 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, bool avoid_partial) : + CFeeRate long_term_feerate, CFeeRate discard_feerate, size_t tx_noinputs_size, bool avoid_partial) : 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), m_avoid_partial_spends(avoid_partial) {} |