Browse Source

Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants

0.13
Patick Strateman 9 years ago
parent
commit
71a2683f4b
  1. 2
      src/init.cpp
  2. 2
      src/main.cpp
  3. 2
      src/net.cpp

2
src/init.cpp

@ -821,7 +821,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
} }
// disable walletbroadcast in blocksonly mode // disable walletbroadcast in blocksonly mode
if (GetBoolArg("-blocksonly", false)) { if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) {
if (SoftSetBoolArg("-whitelistalwaysrelay", false)) if (SoftSetBoolArg("-whitelistalwaysrelay", false))
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistalwaysrelay=0\n", __func__); LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistalwaysrelay=0\n", __func__);
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET

2
src/main.cpp

@ -4218,7 +4218,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
bool fAlreadyHave = AlreadyHave(inv); bool fAlreadyHave = AlreadyHave(inv);
LogPrint("net", "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id); 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); pfrom->AskFor(inv);
if (inv.type == MSG_BLOCK) { if (inv.type == MSG_BLOCK) {

2
src/net.cpp

@ -460,7 +460,7 @@ void CNode::PushVersion()
else else
LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), id); 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, PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe,
nLocalHostNonce, strSubVersion, nBestHeight, !GetBoolArg("-blocksonly", false)); nLocalHostNonce, strSubVersion, nBestHeight, !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY));
} }

Loading…
Cancel
Save