From 97470e385d396053d04627aadea4904d82611c2a Mon Sep 17 00:00:00 2001 From: Duke Date: Fri, 27 Jun 2025 05:45:24 -0400 Subject: [PATCH] Disallow using -mineraddress and -clearnet=0 at the same time --- src/init.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index 2175b7e26..2877dd288 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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);