Remove unused sproutfunds argument

This commit is contained in:
Duke
2023-09-03 08:48:06 -04:00
parent bd38a12512
commit e2521ac2fa
2 changed files with 12 additions and 15 deletions

View File

@@ -65,7 +65,7 @@ int32_t hush_whoami(char *pubkeystr,int32_t height,uint32_t timestamp);
extern int32_t HUSH_LASTMINED,HUSH_LONGESTCHAIN,IS_HUSH_NOTARY,HUSH_INSYNC;
extern char SMART_CHAIN_SYMBOL[HUSH_SMART_CHAIN_MAXLEN];
uint32_t hush_segid32(char *coinaddr);
int64_t hush_coinsupply(int64_t *zfundsp,int64_t *sproutfundsp,int32_t height);
int64_t hush_coinsupply(int64_t *zfundsp,int32_t height);
int32_t notarizedtxid_height(char *dest,char *txidstr,int32_t *hushnotarized_heightp);
uint64_t hush_notarypayamount(int32_t nHeight, int64_t notarycount);
int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp);
@@ -416,7 +416,7 @@ public:
UniValue coinsupply(const UniValue& params, bool fHelp, const CPubKey& mypk)
{
int32_t height = 0; int32_t currentHeight; int64_t blocks_per_year,zf1,zf3,zf12,sf1,sf3,sf12,sproutfunds,zfunds,supply1,supply3,supply12,supply = 0; UniValue result(UniValue::VOBJ);
int32_t height = 0; int32_t currentHeight; int64_t blocks_per_year,zf1,zf3,zf12,zfunds,supply1,supply3,supply12,supply = 0; UniValue result(UniValue::VOBJ);
if (fHelp || params.size() > 1)
throw runtime_error("coinsupply <height>\n"
"\nReturn coin supply information at a given block height. If no height is given, the current height is used.\n"
@@ -441,7 +441,7 @@ UniValue coinsupply(const UniValue& params, bool fHelp, const CPubKey& mypk)
currentHeight = chainActive.Height();
if (height >= 0 && height <= currentHeight) {
if ( (supply= hush_coinsupply(&zfunds,&sproutfunds,height)) > 0 )
if ( (supply= hush_coinsupply(&zfunds,height)) > 0 )
{
result.push_back(Pair("result", "success"));
result.push_back(Pair("coin", SMART_CHAIN_SYMBOL[0] == 0 ? "HUSH" : SMART_CHAIN_SYMBOL));
@@ -454,9 +454,9 @@ UniValue coinsupply(const UniValue& params, bool fHelp, const CPubKey& mypk)
blocks_per_year = 24*3600*365 / ASSETCHAINS_BLOCKTIME;
if ( height > blocks_per_year )
{
supply1 = hush_coinsupply(&zf1,&sf1,height - blocks_per_year/12);
supply3 = hush_coinsupply(&zf3,&sf3,height - blocks_per_year/4);
supply12 = hush_coinsupply(&zf12,&sf12,height - blocks_per_year);
supply1 = hush_coinsupply(&zf1,height - blocks_per_year/12);
supply3 = hush_coinsupply(&zf3,height - blocks_per_year/4);
supply12 = hush_coinsupply(&zf12,height - blocks_per_year);
if ( supply1 != 0 && supply3 != 0 && supply12 != 0 )
{
result.push_back(Pair("lastmonth", ValueFromAmount(supply1+zf1)));