Skip to content

Commit 38011f6

Browse files
committed
[Refactor] move nReserveBalance from main to wallet
1 parent 865b7c4 commit 38011f6

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed

src/init.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,12 +918,14 @@ bool AppInit2()
918918
LogPrintf("AppInit2 : parameter interaction: -enableswifttx=false -> setting -nSwiftTXDepth=0\n");
919919
}
920920

921+
#ifdef ENABLE_WALLET
921922
if (mapArgs.count("-reservebalance")) {
922923
if (!ParseMoney(mapArgs["-reservebalance"], nReserveBalance)) {
923924
InitError(_("Invalid amount for -reservebalance=<amount>"));
924925
return false;
925926
}
926927
}
928+
#endif
927929

928930
// Make sure enough file descriptors are available
929931
int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1);

src/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ bool fAlerts = DEFAULT_ALERTS;
8989
/* If the tip is older than this (in seconds), the node is considered to be in initial block download. */
9090
int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE;
9191

92-
int64_t nReserveBalance = 0;
93-
9492
/** Fees smaller than this (in upiv) are considered zero fee (for relaying and mining)
9593
* We are ~100 times smaller then bitcoin now (2015-06-23), set minRelayTxFee only 10 times higher
9694
* so it's still 10 times lower comparing to bitcoin.

src/main.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ extern bool fVerifyingBlocks;
150150
extern bool fLargeWorkForkFound;
151151
extern bool fLargeWorkInvalidChainFound;
152152

153-
extern int64_t nReserveBalance;
154-
155153
extern std::map<uint256, int64_t> mapRejectedBlocks;
156154

157155
/** Best header we've seen so far (used for getheaders queries' starting points). */

src/wallet/wallet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ bool bSpendZeroConfChange = true;
3030
bool bdisableSystemnotifications = false; // Those bubbles can be annoying and slow down the UI when you get lots of trx
3131
bool fSendFreeTransactions = false;
3232
bool fPayAtLeastCustomFee = true;
33+
int64_t nReserveBalance = 0;
3334

3435
/**
3536
* Fees smaller than this (in upiv) are considered zero fee (for transaction creation)

src/wallet/wallet.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ extern bool bSpendZeroConfChange;
4949
extern bool bdisableSystemnotifications;
5050
extern bool fSendFreeTransactions;
5151
extern bool fPayAtLeastCustomFee;
52+
extern int64_t nReserveBalance;
5253

5354
//! -paytxfee default
5455
static const CAmount DEFAULT_TRANSACTION_FEE = 0;

0 commit comments

Comments
 (0)