Skip to content

Commit 0ecd8aa

Browse files
committed
Merge pull request #4131
3e1cf9b add DEFAULT_TRANSACTION_FEE constant in wallet (Philip Kaufmann)
2 parents 69e264b + 3e1cf9b commit 0ecd8aa

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/qt/optionsmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void OptionsModel::Init()
9393
// Wallet
9494
#ifdef ENABLE_WALLET
9595
if (!settings.contains("nTransactionFee"))
96-
settings.setValue("nTransactionFee", 0);
96+
settings.setValue("nTransactionFee", DEFAULT_TRANSACTION_FEE);
9797
nTransactionFee = settings.value("nTransactionFee").toLongLong(); // if -paytxfee is set, this will be overridden later in init.cpp
9898
if (mapArgs.count("-paytxfee"))
9999
addOverriddenOption("-paytxfee");

src/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
#include "wallet.h"
77

88
#include "base58.h"
9+
#include "checkpoints.h"
910
#include "coincontrol.h"
1011
#include "net.h"
11-
#include "checkpoints.h"
1212

1313
#include <boost/algorithm/string/replace.hpp>
1414
#include <openssl/rand.h>
1515

1616
using namespace std;
1717

1818
// Settings
19-
int64_t nTransactionFee = 0;
19+
int64_t nTransactionFee = DEFAULT_TRANSACTION_FEE;
2020
bool bSpendZeroConfChange = true;
2121

2222
//////////////////////////////////////////////////////////////////////////////

src/wallet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
extern int64_t nTransactionFee;
2828
extern bool bSpendZeroConfChange;
2929

30+
// -paytxfee default
31+
static const int64_t DEFAULT_TRANSACTION_FEE = 0;
3032
// -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB
3133
static const int nHighTransactionFeeWarning = 0.01 * COIN;
3234

0 commit comments

Comments
 (0)