[Qt] Add Smartfee to GUI
This commit is contained in:
@@ -28,7 +28,7 @@ using namespace std;
|
||||
CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
|
||||
unsigned int nTxConfirmTarget = 1;
|
||||
bool bSpendZeroConfChange = true;
|
||||
bool fSendFreeTransactions = true;
|
||||
bool fSendFreeTransactions = false;
|
||||
bool fPayAtLeastCustomFee = true;
|
||||
|
||||
/**
|
||||
@@ -1384,10 +1384,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
|
||||
{
|
||||
LOCK2(cs_main, cs_wallet);
|
||||
{
|
||||
if (fPayAtLeastCustomFee)
|
||||
nFeeRet = payTxFee.GetFeePerK();
|
||||
else
|
||||
nFeeRet = 0;
|
||||
nFeeRet = 0;
|
||||
while (true)
|
||||
{
|
||||
txNew.vin.clear();
|
||||
@@ -1636,6 +1633,9 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
|
||||
// prevent user from paying a non-sense fee (like 1 satoshi): 0 < fee < minRelayFee
|
||||
if (nFeeNeeded > 0 && nFeeNeeded < ::minRelayTxFee.GetFee(nTxBytes))
|
||||
nFeeNeeded = ::minRelayTxFee.GetFee(nTxBytes);
|
||||
// user selected total at least (default=true)
|
||||
if (fPayAtLeastCustomFee && nFeeNeeded > 0 && nFeeNeeded < payTxFee.GetFeePerK())
|
||||
nFeeNeeded = payTxFee.GetFeePerK();
|
||||
// User didn't set: use -txconfirmtarget to estimate...
|
||||
if (nFeeNeeded == 0)
|
||||
nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes);
|
||||
|
||||
Reference in New Issue
Block a user