Skip to content

Commit

Permalink
Move -blocksonly parameter interaction to the new ParameterInteractio…
Browse files Browse the repository at this point in the history
…n() function
  • Loading branch information
jonasschnelli committed Nov 27, 2015
1 parent 68354e7 commit df66147
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,16 @@ void InitParameterInteraction()
if (SoftSetBoolArg("-rescan", true))
LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n", __func__);
}

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

/** Initialize bitcoin.
Expand Down

0 comments on commit df66147

Please sign in to comment.