diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-02-04 18:28:45 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-03-24 00:23:02 -0400 |
commit | bcd716670ba8a189a2e9b8b035318abceb9ce631 (patch) | |
tree | fe4cb317d999195c0c5bc7a36dba672a1b430857 /src/wallet/wallet.h | |
parent | 34c89f92f34b5ca12da95d5f0b0240682c5a1c1f (diff) | |
download | bitcoin-bcd716670ba8a189a2e9b8b035318abceb9ce631.tar.xz |
wallet: Move long term feerate setting to CreateTransaction
Instead of setting the long term feerate for each SelectCoinsMinConf
iteration, set it once during CreateTransaction and let it be shared
with each SelectCoinsMinConf through
coin_selection_params.m_long_term_feerate.
Does not change behavior.
Github-Pull: #21083
Rebased-From: 448d04b931f86941903e855f831249ff5ec77485
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 69cf6b66a4..65b57396bf 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -607,11 +607,20 @@ struct CoinSelectionParams size_t change_output_size = 0; size_t change_spend_size = 0; CFeeRate effective_fee = CFeeRate(0); + CFeeRate m_long_term_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, 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), tx_noinputs_size(tx_noinputs_size) {} + 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) : + 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), + tx_noinputs_size(tx_noinputs_size) + {} CoinSelectionParams() {} }; |