Disallow using -mineraddress and -clearnet=0 at the same time

This commit is contained in:
Duke
2025-06-27 05:45:24 -04:00
parent 7e63e2f013
commit 97470e385d

View File

@@ -1649,6 +1649,14 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// Disable clearnet peers if -clearnet=0
if (!GetBoolArg("-clearnet", DEFAULT_CLEARNET)) {
#ifdef ENABLE_MINING
// mining to the same taddr links different txs together as from the same owner
// and if using -clearnet=0 that can be used to link together different .onions
// as being the same entity, because they are mining to the same taddr
if (mapArgs.count("-mineraddress")) {
return InitError(_("-mineraddress and -clearnet=0 cannot be used together because it would reduce your privacy!"));
}
#endif
SoftSetBoolArg("-disableipv4", true);
SoftSetBoolArg("-disableipv6", true);
SoftSetBoolArg("-dns", false);