Skip to content

Commit df66147

Browse files
committed
Move -blocksonly parameter interaction to the new ParameterInteraction() function
1 parent 68354e7 commit df66147

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/init.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,16 @@ void InitParameterInteraction()
743743
if (SoftSetBoolArg("-rescan", true))
744744
LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n", __func__);
745745
}
746+
747+
// disable walletbroadcast and whitelistalwaysrelay in blocksonly mode
748+
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) {
749+
if (SoftSetBoolArg("-whitelistalwaysrelay", false))
750+
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistalwaysrelay=0\n", __func__);
751+
#ifdef ENABLE_WALLET
752+
if (SoftSetBoolArg("-walletbroadcast", false))
753+
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
754+
#endif
755+
}
746756
}
747757

748758
/** Initialize bitcoin.

0 commit comments

Comments
 (0)