1 // Copyright (c) 2009-2010 Satoshi Nakamoto 2 // Copyright (c) 2009-2018 The Bitcoin Core developers 3 // Distributed under the MIT software license, see the accompanying 4 // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 6 #ifndef BITCOIN_WALLET_FEES_H 7 #define BITCOIN_WALLET_FEES_H 8 9 #include <amount.h> 10 11 class CCoinControl; 12 class CFeeRate; 13 class CWallet; 14 struct FeeCalculation; 15 16 /** 17 * Return the minimum required absolute fee for this size 18 * based on the required fee rate 19 */ 20 CAmount GetRequiredFee(const CWallet& wallet, unsigned int nTxBytes); 21 22 /** 23 * Estimate the minimum fee considering user set parameters 24 * and the required fee 25 */ 26 CAmount GetMinimumFee(const CWallet& wallet, unsigned int nTxBytes, const CCoinControl& coin_control, FeeCalculation* feeCalc); 27 28 /** 29 * Return the minimum required feerate taking into account the 30 * minimum relay feerate and user set minimum transaction feerate 31 */ 32 CFeeRate GetRequiredFeeRate(const CWallet& wallet); 33 34 /** 35 * Estimate the minimum fee rate considering user set parameters 36 * and the required fee 37 */ 38 CFeeRate GetMinimumFeeRate(const CWallet& wallet, const CCoinControl& coin_control, FeeCalculation* feeCalc); 39 40 /** 41 * Return the maximum feerate for discarding change. 42 */ 43 CFeeRate GetDiscardRate(const CWallet& wallet); 44 45 #endif // BITCOIN_WALLET_FEES_H 46