From 71a2683f4b526b17adf317733b0aa18ffacecfdc Mon Sep 17 00:00:00 2001 From: Patick Strateman Date: Sat, 14 Nov 2015 05:10:59 -0800 Subject: [PATCH] Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants --- src/init.cpp | 2 +- src/main.cpp | 2 +- src/net.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index b22831956..666fa8731 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -821,7 +821,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } // disable walletbroadcast in blocksonly mode - if (GetBoolArg("-blocksonly", false)) { + if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) { if (SoftSetBoolArg("-whitelistalwaysrelay", false)) LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistalwaysrelay=0\n", __func__); #ifdef ENABLE_WALLET diff --git a/src/main.cpp b/src/main.cpp index 9842acb4b..fb529eb5b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4218,7 +4218,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, bool fAlreadyHave = AlreadyHave(inv); LogPrint("net", "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id); - if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK && !GetBoolArg("-blocksonly", false)) + if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK && !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) pfrom->AskFor(inv); if (inv.type == MSG_BLOCK) { diff --git a/src/net.cpp b/src/net.cpp index a62e875f8..000eefc85 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -460,7 +460,7 @@ void CNode::PushVersion() else LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), id); PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, - nLocalHostNonce, strSubVersion, nBestHeight, !GetBoolArg("-blocksonly", false)); + nLocalHostNonce, strSubVersion, nBestHeight, !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)); }