Browse Source

Cleanup

pull/384/head
Duke 5 months ago
parent
commit
e5dc287d2f
  1. 30
      src/hush_bitcoind.h
  2. 2
      src/hush_utils.h

30
src/hush_bitcoind.h

@ -551,34 +551,6 @@ CScript hush_makeopret(CBlock *pblock, bool fNew)
return(opret);
}
/*uint256 hush_getblockhash(int32_t height)
{
uint256 hash; char params[128],*hexstr,*jsonstr; cJSON *result; int32_t i; uint8_t revbuf[32];
memset(&hash,0,sizeof(hash));
sprintf(params,"[%d]",height);
if ( (jsonstr= hush_issuemethod(HUSHUSERPASS,(char *)"getblockhash",params,BITCOIND_RPCPORT)) != 0 )
{
if ( (result= cJSON_Parse(jsonstr)) != 0 )
{
if ( (hexstr= jstr(result,(char *)"result")) != 0 )
{
if ( is_hexstr(hexstr,0) == 64 )
{
decode_hex(revbuf,32,hexstr);
for (i=0; i<32; i++)
((uint8_t *)&hash)[i] = revbuf[31-i];
}
}
free_json(result);
}
printf("HUSH3 hash.%d (%s) %x\n",height,jsonstr,*(uint32_t *)&hash);
free(jsonstr);
}
return(hash);
}
uint256 _hush_getblockhash(int32_t height);*/
uint64_t hush_seed(int32_t height)
{
uint64_t seed = 0;
@ -977,7 +949,7 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams);
// 10% of all block rewards go towards Hush core team
// If you do not like this, you are encouraged to fork the chain
// or start your own Hush Smart Chain: https://git.hush.is/hush/hush-smart-chains
// HUSH supply curve cannot be exactly represented via KMD AC CLI args, so we do it ourselves.
// HUSH supply curve cannot be exactly represented via CLI args, so we do it ourselves.
// You specify the BR, and the FR % gets added so 10% of 12.5 is 1.25
// but to tell the AC params, I need to say "11% of 11.25" is 1.25
// 11% ie. 1/9th cannot be exactly represented and so the FR has tiny amounts of error unless done manually

2
src/hush_utils.h

@ -1528,7 +1528,7 @@ uint64_t hush_max_money()
}
// This implements the Hush Emission Curve, the miner subsidy part,
// and must be kept in sync with hush_commision() in komoto_bitcoind.h!
// and must be kept in sync with hush_commision() in hush_bitcoind.h!
// Changing these functions are consensus changes!
// Here Be Dragons! -- Duke Leto
uint64_t hush_block_subsidy(int height)

Loading…
Cancel
Save