Skip to content

Commit 71a2683

Browse files
committed
Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants
1 parent 762b13b commit 71a2683

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
821821
}
822822

823823
// disable walletbroadcast in blocksonly mode
824-
if (GetBoolArg("-blocksonly", false)) {
824+
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) {
825825
if (SoftSetBoolArg("-whitelistalwaysrelay", false))
826826
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistalwaysrelay=0\n", __func__);
827827
#ifdef ENABLE_WALLET

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4218,7 +4218,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
42184218
bool fAlreadyHave = AlreadyHave(inv);
42194219
LogPrint("net", "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id);
42204220

4221-
if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK && !GetBoolArg("-blocksonly", false))
4221+
if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK && !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY))
42224222
pfrom->AskFor(inv);
42234223

42244224
if (inv.type == MSG_BLOCK) {

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ void CNode::PushVersion()
460460
else
461461
LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), id);
462462
PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe,
463-
nLocalHostNonce, strSubVersion, nBestHeight, !GetBoolArg("-blocksonly", false));
463+
nLocalHostNonce, strSubVersion, nBestHeight, !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY));
464464
}
465465

466466

0 commit comments

Comments
 (0)