From e50acce01f64cf064d12a91a0663a0f1a69e0956 Mon Sep 17 00:00:00 2001 From: smk762 Date: Fri, 8 Mar 2024 12:13:33 +0800 Subject: [PATCH] Allow private ZOMBIEs --- src/komodo_utils.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/komodo_utils.cpp b/src/komodo_utils.cpp index 197661ab8aa..8ec5b090408 100644 --- a/src/komodo_utils.cpp +++ b/src/komodo_utils.cpp @@ -1553,16 +1553,14 @@ void komodo_args(char *argv0) { BITCOIND_RPCPORT = GetArg("-rpcport", ASSETCHAINS_RPCPORT); //fprintf(stderr,"(%s) port.%u chain params initialized\n",chainName.symbol().c_str(),BITCOIND_RPCPORT); - if ( chainName.isSymbol("PIRATE") && ASSETCHAINS_HALVING[0] == 77777 ) - { + if (chainName.isSymbol("PIRATE") && ASSETCHAINS_HALVING[0] == 77777) { ASSETCHAINS_HALVING[0] *= 5; - fprintf(stderr,"PIRATE halving changed to %d %.1f days ASSETCHAINS_LASTERA.%llu\n",(int32_t)ASSETCHAINS_HALVING[0],(double)ASSETCHAINS_HALVING[0]/1440,(long long)ASSETCHAINS_LASTERA); + fprintf(stderr, "PIRATE halving changed to %d %.1f days ASSETCHAINS_LASTERA.%llu\n", (int32_t)ASSETCHAINS_HALVING[0], (double)ASSETCHAINS_HALVING[0] / 1440, (long long)ASSETCHAINS_LASTERA); } - else if ( chainName.isSymbol("ZOMBIE") and IS_KOMODO_TESTNODE ) - fprintf(stderr, "TEST COIN, DO NOT BUY\n"); - else if ( ASSETCHAINS_PRIVATE != 0 ) - { - fprintf(stderr,"-ac_private for a non-PIRATE chain is not supported. The only reason to have an -ac_private chain is for total privacy and that is best achieved with the largest anon set. PIRATE has that and it is recommended to just use PIRATE\n"); + + std::set allowedPrivateOnly = {"PIRATE", "ZOMBIE"}; + if (ASSETCHAINS_PRIVATE != 0 && allowedPrivateOnly.find(chainName.ToString()) == allowedPrivateOnly.end()) { + fprintf(stderr, "-ac_private for a non-PIRATE chain is not supported. The only reason to have an -ac_private chain is for total privacy and that is best achieved with the largest anon set. PIRATE has that and it is recommended to just use PIRATE\n"); StartShutdown(); } // Set cc enables for all existing ac_cc chains here.