Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/fees.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2017 The Bitcoin Core developers | // Copyright (c) 2009-2017 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "wallet/fees.h" | #include "wallet/fees.h" | ||||
#include "config.h" | #include "config.h" | ||||
#include "policy/policy.h" | #include "policy/policy.h" | ||||
#include "txmempool.h" | #include "txmempool.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "validation.h" | #include "validation.h" | ||||
#include "wallet/coincontrol.h" | #include "wallet/coincontrol.h" | ||||
#include "wallet/wallet.h" | #include "wallet/wallet.h" | ||||
Amount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, | Amount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, | ||||
deadalnix: Remove nConfirmTarget then. | |||||
FabienUnsubmitted Done Inline ActionsDo you plan to remove nConfirmTarget also (no longer used) ? Fabien: Do you plan to remove `nConfirmTarget` also (no longer used) ? | |||||
jasonbcoxAuthorUnsubmitted Done Inline ActionsI will do this in a separate diff due to the size of that change being larger than this one. jasonbcox: I will do this in a separate diff due to the size of that change being larger than this one. | |||||
jasonbcoxAuthorUnsubmitted Done Inline Actionsjasonbcox: D2588 | |||||
const CTxMemPool &pool, Amount targetFee) { | const CTxMemPool &pool, Amount targetFee) { | ||||
Amount nFeeNeeded = targetFee; | Amount nFeeNeeded = targetFee; | ||||
// User didn't set: use -txconfirmtarget to estimate... | // User didn't set: use -txconfirmtarget to estimate... | ||||
if (nFeeNeeded == Amount::zero()) { | if (nFeeNeeded == Amount::zero()) { | ||||
nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFeeCeiling(nTxBytes); | nFeeNeeded = pool.estimateFee().GetFeeCeiling(nTxBytes); | ||||
// ... unless we don't have enough mempool data for estimatefee, then | // ... unless we don't have enough mempool data for estimatefee, then | ||||
// use fallbackFee. | // use fallbackFee. | ||||
if (nFeeNeeded == Amount::zero()) { | if (nFeeNeeded == Amount::zero()) { | ||||
nFeeNeeded = CWallet::fallbackFee.GetFeeCeiling(nTxBytes); | nFeeNeeded = CWallet::fallbackFee.GetFeeCeiling(nTxBytes); | ||||
} | } | ||||
} | } | ||||
// Prevent user from paying a fee below minRelayTxFee or minTxFee. | // Prevent user from paying a fee below minRelayTxFee or minTxFee. | ||||
Show All 17 Lines |
Remove nConfirmTarget then.