BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
fees.h
Go to the documentation of this file.
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 
12 class CCoinControl;
13 class CFeeRate;
14 class CTxMemPool;
15 class CWallet;
16 struct FeeCalculation;
17 
22 CAmount GetRequiredFee(const CWallet& wallet, unsigned int nTxBytes);
23 
28 CAmount GetMinimumFee(const CWallet& wallet, unsigned int nTxBytes, const CCoinControl& coin_control, const CTxMemPool& pool, const CBlockPolicyEstimator& estimator, FeeCalculation* feeCalc);
29 
34 CFeeRate GetRequiredFeeRate(const CWallet& wallet);
35 
40 CFeeRate GetMinimumFeeRate(const CWallet& wallet, const CCoinControl& coin_control, const CTxMemPool& pool, const CBlockPolicyEstimator& estimator, FeeCalculation* feeCalc);
41 
45 CFeeRate GetDiscardRate(const CWallet& wallet, const CBlockPolicyEstimator& estimator);
46 
47 #endif // BITCOIN_WALLET_FEES_H
CAmount GetMinimumFee(const CWallet &wallet, unsigned int nTxBytes, const CCoinControl &coin_control, const CTxMemPool &pool, const CBlockPolicyEstimator &estimator, FeeCalculation *feeCalc)
Estimate the minimum fee considering user set parameters and the required fee.
Definition: fees.cpp:22
CFeeRate GetDiscardRate(const CWallet &wallet, const CBlockPolicyEstimator &estimator)
Return the maximum feerate for discarding change.
Definition: fees.cpp:93
Coin Control Features.
Definition: coincontrol.h:16
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
The BlockPolicyEstimator is used for estimating the feerate needed for a transaction to be included i...
Definition: fees.h:136
CFeeRate GetRequiredFeeRate(const CWallet &wallet)
Return the minimum required feerate taking into account the minimum relay feerate and user set minimu...
Definition: fees.cpp:33
CAmount GetRequiredFee(const CWallet &wallet, unsigned int nTxBytes)
Return the minimum required absolute fee for this size based on the required fee rate.
Definition: fees.cpp:16
CFeeRate GetMinimumFeeRate(const CWallet &wallet, const CCoinControl &coin_control, const CTxMemPool &pool, const CBlockPolicyEstimator &estimator, FeeCalculation *feeCalc)
Estimate the minimum fee rate considering user set parameters and the required fee.
Definition: fees.cpp:38
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:441
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:599
Fee rate in satoshis per kilobyte: CAmount / kB.
Definition: feerate.h:19