Skip to content

Commit

Permalink
Merge pull request #615 from KomodoPlatform/patch-add-zombie-warning
Browse files Browse the repository at this point in the history
allow -ac_private for the ZOMBIE test chain
  • Loading branch information
ca333 authored Jun 11, 2024
2 parents 261233c + 5216f6b commit faa9996
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/komodo_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1552,16 +1552,25 @@ void komodo_args(char *argv0)
if ( !chainName.isKMD() )
{
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 )
{
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);
}
else if ( ASSETCHAINS_PRIVATE != 0 )

// Chains for which the use of "-ac_private" is permitted.
const std::set<std::string> allowedPrivateOnly = {"PIRATE", "ZOMBIE"};

if ( ASSETCHAINS_PRIVATE != 0 && allowedPrivateOnly.count(chainName.ToString()) == 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");
fprintf(stderr, "-ac_private for a non-PIRATE chain is not supported.\n"
"The only reason to have an -ac_private chain is for total\n"
"privacy and that is best achieved with the largest anon set.\n"
"PIRATE has that and it is recommended to just use PIRATE\n");
StartShutdown();
throw std::invalid_argument("-ac_private for a non-PIRATE chain is not supported.");
}
// Set cc enables for all existing ac_cc chains here.
if ( chainName.isSymbol("AXO") )
Expand Down

0 comments on commit faa9996

Please sign in to comment.