mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
[Wallet] Add global boolean whether to pay at least the custom fee (default=true)
This commit is contained in:
parent
0ed9675be4
commit
ed3e5e468c
@ -29,6 +29,7 @@ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
|
||||
unsigned int nTxConfirmTarget = 1;
|
||||
bool bSpendZeroConfChange = true;
|
||||
bool fSendFreeTransactions = true;
|
||||
bool fPayAtLeastCustomFee = true;
|
||||
|
||||
/**
|
||||
* Fees smaller than this (in satoshi) are considered zero fee (for transaction creation)
|
||||
@ -1383,7 +1384,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
|
||||
{
|
||||
LOCK2(cs_main, cs_wallet);
|
||||
{
|
||||
nFeeRet = payTxFee.GetFeePerK();
|
||||
if (fPayAtLeastCustomFee)
|
||||
nFeeRet = payTxFee.GetFeePerK();
|
||||
else
|
||||
nFeeRet = 0;
|
||||
while (true)
|
||||
{
|
||||
txNew.vin.clear();
|
||||
|
@ -33,6 +33,7 @@ extern CFeeRate payTxFee;
|
||||
extern unsigned int nTxConfirmTarget;
|
||||
extern bool bSpendZeroConfChange;
|
||||
extern bool fSendFreeTransactions;
|
||||
extern bool fPayAtLeastCustomFee;
|
||||
|
||||
//! -paytxfee default
|
||||
static const CAmount DEFAULT_TRANSACTION_FEE = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user