cleanup: rebrand residual user-facing "HUSH" strings to DragonX
Sweeps the leftover coin-name strings in RPC help text, RPC output, and log
messages that the currency-unit change didn't cover:
- RPC help: "mining reward amount in HUSH" -> DRAGONX (mining.cpp x2);
"at least minbal HUSH" -> DRAGONX (rpcwallet.cpp); "the HUSH address" /
"(string) HUSH address" -> DragonX (rawtransaction.cpp)
- RPC output: the SMART_CHAIN_SYMBOL[0]==0 ? "HUSH" : SYMBOL coin-name fallback
(crosschain/misc/mining/blockchain) -> "DRAGONX"; the notarizations JSON key
make_pair("HUSH", ...) -> "DRAGONX"
- Logs: "HUSH blocktime changing", "stopping HUSH HTTP/REST/RPC",
"HUSH raw magic=" -> DragonX
Left untouched (verified): the 82 "HUSH3"/ishush3 chain-symbol consensus checks;
hush_globals.h CURRENCIES[] price-oracle basket (internal lookup, dead feature
on DragonX); hush.h notarization debug printf; a commented-out cout in main.cpp.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -502,7 +502,7 @@ void hush_changeblocktime()
|
|||||||
{
|
{
|
||||||
pCurrentParams->consensus.nMaxFutureBlockTime = 7 * ASSETCHAINS_BLOCKTIME;
|
pCurrentParams->consensus.nMaxFutureBlockTime = 7 * ASSETCHAINS_BLOCKTIME;
|
||||||
pCurrentParams->consensus.nPowTargetSpacing = ASSETCHAINS_BLOCKTIME;
|
pCurrentParams->consensus.nPowTargetSpacing = ASSETCHAINS_BLOCKTIME;
|
||||||
fprintf(stderr,"HUSH blocktime changing to %d seconds\n",ASSETCHAINS_BLOCKTIME);
|
fprintf(stderr,"DragonX blocktime changing to %d seconds\n",ASSETCHAINS_BLOCKTIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hush_setactivation(int32_t height)
|
void hush_setactivation(int32_t height)
|
||||||
|
|||||||
@@ -1466,7 +1466,7 @@ uint32_t hush_smartmagic(char *symbol,uint64_t supply,uint8_t *extraptr,int32_t
|
|||||||
{
|
{
|
||||||
vcalc_sha256(0,hash.bytes,extraptr,extralen);
|
vcalc_sha256(0,hash.bytes,extraptr,extralen);
|
||||||
crc0 = hash.uints[0];
|
crc0 = hash.uints[0];
|
||||||
fprintf(stderr,"HUSH raw magic=");
|
fprintf(stderr,"DragonX raw magic=");
|
||||||
int32_t i; for (i=0; i<extralen; i++)
|
int32_t i; for (i=0; i<extralen; i++)
|
||||||
fprintf(stderr,"%02x",extraptr[i]);
|
fprintf(stderr,"%02x",extraptr[i]);
|
||||||
fprintf(stderr," extralen=%d crc0=%x\n",extralen,crc0);
|
fprintf(stderr," extralen=%d crc0=%x\n",extralen,crc0);
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ void Shutdown()
|
|||||||
mempool.AddTransactionsUpdated(1);
|
mempool.AddTransactionsUpdated(1);
|
||||||
|
|
||||||
if(fDebug) {
|
if(fDebug) {
|
||||||
fprintf(stderr,"%s: stopping HUSH HTTP/REST/RPC\n", __FUNCTION__);
|
fprintf(stderr,"%s: stopping DragonX HTTP/REST/RPC\n", __FUNCTION__);
|
||||||
}
|
}
|
||||||
StopHTTPRPC();
|
StopHTTPRPC();
|
||||||
StopREST();
|
StopREST();
|
||||||
|
|||||||
@@ -926,7 +926,7 @@ UniValue kvsearch(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
if ( (keylen= (int32_t)strlen(params[0].get_str().c_str())) > 0 )
|
if ( (keylen= (int32_t)strlen(params[0].get_str().c_str())) > 0 )
|
||||||
{
|
{
|
||||||
ret.push_back(Pair("coin",(char *)(SMART_CHAIN_SYMBOL[0] == 0 ? "HUSH" : SMART_CHAIN_SYMBOL)));
|
ret.push_back(Pair("coin",(char *)(SMART_CHAIN_SYMBOL[0] == 0 ? "DRAGONX" : SMART_CHAIN_SYMBOL)));
|
||||||
ret.push_back(Pair("currentheight", (int64_t)chainActive.LastTip()->GetHeight()));
|
ret.push_back(Pair("currentheight", (int64_t)chainActive.LastTip()->GetHeight()));
|
||||||
ret.push_back(Pair("key",params[0].get_str()));
|
ret.push_back(Pair("key",params[0].get_str()));
|
||||||
ret.push_back(Pair("keylen",keylen));
|
ret.push_back(Pair("keylen",keylen));
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ UniValue height_MoM(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
}
|
}
|
||||||
//fprintf(stderr,"height_MoM height.%d\n",height);
|
//fprintf(stderr,"height_MoM height.%d\n",height);
|
||||||
depth = hush_MoM(¬arized_height,&MoM,&hushtxid,height,&MoMoM,&MoMoMoffset,&MoMoMdepth,&hushstarti,&hushendi);
|
depth = hush_MoM(¬arized_height,&MoM,&hushtxid,height,&MoMoM,&MoMoMoffset,&MoMoMdepth,&hushstarti,&hushendi);
|
||||||
ret.push_back(Pair("coin",(char *)(SMART_CHAIN_SYMBOL[0] == 0 ? "HUSH" : SMART_CHAIN_SYMBOL)));
|
ret.push_back(Pair("coin",(char *)(SMART_CHAIN_SYMBOL[0] == 0 ? "DRAGONX" : SMART_CHAIN_SYMBOL)));
|
||||||
ret.push_back(Pair("height",height));
|
ret.push_back(Pair("height",height));
|
||||||
ret.push_back(Pair("timestamp",(uint64_t)timestamp));
|
ret.push_back(Pair("timestamp",(uint64_t)timestamp));
|
||||||
if ( depth > 0 )
|
if ( depth > 0 )
|
||||||
@@ -165,7 +165,7 @@ UniValue calc_MoM(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
throw runtime_error("calc_MoM illegal height or MoMdepth\n");
|
throw runtime_error("calc_MoM illegal height or MoMdepth\n");
|
||||||
//fprintf(stderr,"height_MoM height.%d\n",height);
|
//fprintf(stderr,"height_MoM height.%d\n",height);
|
||||||
MoM = hush_calcMoM(height,MoMdepth);
|
MoM = hush_calcMoM(height,MoMdepth);
|
||||||
ret.push_back(Pair("coin",(char *)(SMART_CHAIN_SYMBOL[0] == 0 ? "HUSH" : SMART_CHAIN_SYMBOL)));
|
ret.push_back(Pair("coin",(char *)(SMART_CHAIN_SYMBOL[0] == 0 ? "DRAGONX" : SMART_CHAIN_SYMBOL)));
|
||||||
ret.push_back(Pair("height",height));
|
ret.push_back(Pair("height",height));
|
||||||
ret.push_back(Pair("MoMdepth",MoMdepth));
|
ret.push_back(Pair("MoMdepth",MoMdepth));
|
||||||
ret.push_back(Pair("MoM",MoM.GetHex()));
|
ret.push_back(Pair("MoM",MoM.GetHex()));
|
||||||
@@ -235,7 +235,7 @@ UniValue getNotarizationsForBlock(const UniValue& params, bool fHelp, const CPub
|
|||||||
item.push_back(make_pair("notaries",notaryarr));
|
item.push_back(make_pair("notaries",notaryarr));
|
||||||
hush.push_back(item);
|
hush.push_back(item);
|
||||||
}
|
}
|
||||||
out.push_back(make_pair("HUSH", hush));
|
out.push_back(make_pair("DRAGONX", hush));
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ UniValue genminingCSV(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
if (fHelp || params.size() != 0 )
|
if (fHelp || params.size() != 0 )
|
||||||
throw runtime_error("genminingCSV\n");
|
throw runtime_error("genminingCSV\n");
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
sprintf(fname,"%s_mining.csv",SMART_CHAIN_SYMBOL[0] == 0 ? "HUSH" : SMART_CHAIN_SYMBOL);
|
sprintf(fname,"%s_mining.csv",SMART_CHAIN_SYMBOL[0] == 0 ? "DRAGONX" : SMART_CHAIN_SYMBOL);
|
||||||
if ( (fp= fopen(fname,"wb")) != 0 )
|
if ( (fp= fopen(fname,"wb")) != 0 )
|
||||||
{
|
{
|
||||||
fprintf(fp,"height,nTime,nBits,bnTarget,bnTargetB,diff,solvetime\n");
|
fprintf(fp,"height,nTime,nBits,bnTarget,bnTargetB,diff,solvetime\n");
|
||||||
@@ -1019,8 +1019,8 @@ UniValue getblocksubsidy(const UniValue& params, bool fHelp, const CPubKey& mypk
|
|||||||
"1. height (numeric, optional) The block height. If not provided, defaults to the current height of the chain.\n"
|
"1. height (numeric, optional) The block height. If not provided, defaults to the current height of the chain.\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"miner\" : x.xxx (numeric) The mining reward amount in HUSH.\n"
|
" \"miner\" : x.xxx (numeric) The mining reward amount in DRAGONX.\n"
|
||||||
" \"ac_pubkey\" : x.xxx (numeric) The mining reward amount in HUSH.\n"
|
" \"ac_pubkey\" : x.xxx (numeric) The mining reward amount in DRAGONX.\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"\nExamples:\n"
|
"\nExamples:\n"
|
||||||
+ HelpExampleCli("getblocksubsidy", "1000")
|
+ HelpExampleCli("getblocksubsidy", "1000")
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
}
|
}
|
||||||
if ( ASSETCHAINS_CC != 0 )
|
if ( ASSETCHAINS_CC != 0 )
|
||||||
obj.push_back(Pair("CCid", (int)ASSETCHAINS_CC));
|
obj.push_back(Pair("CCid", (int)ASSETCHAINS_CC));
|
||||||
obj.push_back(Pair("name", SMART_CHAIN_SYMBOL[0] == 0 ? "HUSH" : SMART_CHAIN_SYMBOL));
|
obj.push_back(Pair("name", SMART_CHAIN_SYMBOL[0] == 0 ? "DRAGONX" : SMART_CHAIN_SYMBOL));
|
||||||
|
|
||||||
obj.push_back(Pair("p2pport", ASSETCHAINS_P2PPORT));
|
obj.push_back(Pair("p2pport", ASSETCHAINS_P2PPORT));
|
||||||
obj.push_back(Pair("rpcport", ASSETCHAINS_RPCPORT));
|
obj.push_back(Pair("rpcport", ASSETCHAINS_RPCPORT));
|
||||||
@@ -445,7 +445,7 @@ UniValue coinsupply(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
if ( (supply= hush_coinsupply(&zfunds,height)) > 0 )
|
if ( (supply= hush_coinsupply(&zfunds,height)) > 0 )
|
||||||
{
|
{
|
||||||
result.push_back(Pair("result", "success"));
|
result.push_back(Pair("result", "success"));
|
||||||
result.push_back(Pair("coin", SMART_CHAIN_SYMBOL[0] == 0 ? "HUSH" : SMART_CHAIN_SYMBOL));
|
result.push_back(Pair("coin", SMART_CHAIN_SYMBOL[0] == 0 ? "DRAGONX" : SMART_CHAIN_SYMBOL));
|
||||||
result.push_back(Pair("height", (int)height));
|
result.push_back(Pair("height", (int)height));
|
||||||
result.push_back(Pair("supply", ValueFromAmount(supply)));
|
result.push_back(Pair("supply", ValueFromAmount(supply)));
|
||||||
result.push_back(Pair("zfunds", ValueFromAmount(zfunds)));
|
result.push_back(Pair("zfunds", ValueFromAmount(zfunds)));
|
||||||
|
|||||||
@@ -628,7 +628,7 @@ UniValue createrawtransaction(const UniValue& params, bool fHelp, const CPubKey&
|
|||||||
" ]\n"
|
" ]\n"
|
||||||
"2. \"outputs\" (object, required) a json object with outputs\n"
|
"2. \"outputs\" (object, required) a json object with outputs\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"address\": x.xxx, (numeric or string, required) The key is the HUSH address or script (in hex), the numeric value (can be string) is the " + CURRENCY_UNIT + " amount\n"
|
" \"address\": x.xxx, (numeric or string, required) The key is the DragonX address or script (in hex), the numeric value (can be string) is the " + CURRENCY_UNIT + " amount\n"
|
||||||
" \"data\": \"hex\" (string, optional) The key is \"data\", the value is hex encoded OP_RETURN data\n"
|
" \"data\": \"hex\" (string, optional) The key is \"data\", the value is hex encoded OP_RETURN data\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
@@ -804,7 +804,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp, const CPubKey&
|
|||||||
" \"reqSigs\" : n, (numeric) The required sigs\n"
|
" \"reqSigs\" : n, (numeric) The required sigs\n"
|
||||||
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
|
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
|
||||||
" \"addresses\" : [ (json array of string)\n"
|
" \"addresses\" : [ (json array of string)\n"
|
||||||
" \"RTZMZHDFSTFQst8XmX2dR4DaH87cEUs3gC\" (string) HUSH address\n"
|
" \"RTZMZHDFSTFQst8XmX2dR4DaH87cEUs3gC\" (string) DragonX address\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" ]\n"
|
" ]\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
|
|||||||
@@ -4049,7 +4049,7 @@ UniValue z_getbalances(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
"z_getbalances\n"
|
"z_getbalances\n"
|
||||||
"\nReturns array of addresses with their unspent shielded balances.\n"
|
"\nReturns array of addresses with their unspent shielded balances.\n"
|
||||||
"Optionally filter to only include addresses with at least minbal HUSH.\n"
|
"Optionally filter to only include addresses with at least minbal DRAGONX.\n"
|
||||||
"Results are an array of Objects, each of which has:\n"
|
"Results are an array of Objects, each of which has:\n"
|
||||||
"{address, balance}\n"
|
"{address, balance}\n"
|
||||||
"\nArguments:\n"
|
"\nArguments:\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user