Remove unused sproutfunds argument
This commit is contained in:
@@ -1790,9 +1790,9 @@ int32_t hush_scpublic(uint32_t tiptime)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t hush_newcoins(int64_t *zfundsp,int64_t *sproutfundsp,int32_t nHeight,CBlock *pblock)
|
||||
int64_t hush_newcoins(int64_t *zfundsp,int32_t nHeight,CBlock *pblock)
|
||||
{
|
||||
CTxDestination address; int32_t i,j,m,n,vout; uint8_t *script; uint256 txid,hashBlock; int64_t zfunds=0,vinsum=0,voutsum=0,sproutfunds=0;
|
||||
CTxDestination address; int32_t i,j,m,n,vout; uint8_t *script; uint256 txid,hashBlock; int64_t zfunds=0,vinsum=0,voutsum=0;
|
||||
n = pblock->vtx.size();
|
||||
for (i=0; i<n; i++)
|
||||
{
|
||||
@@ -1832,7 +1832,6 @@ int64_t hush_newcoins(int64_t *zfundsp,int64_t *sproutfundsp,int32_t nHeight,CBl
|
||||
zfunds -= tx.valueBalance;
|
||||
}
|
||||
*zfundsp = zfunds;
|
||||
*sproutfundsp = sproutfunds;
|
||||
if ( SMART_CHAIN_SYMBOL[0] == 0 && (voutsum-vinsum) == 100003*SATOSHIDEN ) // 15 times
|
||||
return(3 * SATOSHIDEN);
|
||||
//if ( voutsum-vinsum+zfunds > 100000*SATOSHIDEN || voutsum-vinsum+zfunds < 0 )
|
||||
@@ -1840,11 +1839,11 @@ int64_t hush_newcoins(int64_t *zfundsp,int64_t *sproutfundsp,int32_t nHeight,CBl
|
||||
return(voutsum - vinsum);
|
||||
}
|
||||
|
||||
int64_t hush_coinsupply(int64_t *zfundsp,int64_t *sproutfundsp,int32_t height)
|
||||
int64_t hush_coinsupply(int64_t *zfundsp,int32_t height)
|
||||
{
|
||||
CBlockIndex *pindex; CBlock block; int64_t zfunds=0,sproutfunds=0,supply = 0;
|
||||
CBlockIndex *pindex; CBlock block; int64_t zfunds=0,supply = 0;
|
||||
//fprintf(stderr,"coinsupply %d\n",height);
|
||||
*zfundsp = *sproutfundsp = 0;
|
||||
*zfundsp = 0;
|
||||
if ( (pindex= hush_chainactive(height)) != 0 )
|
||||
{
|
||||
while ( pindex != 0 && pindex->GetHeight() > 0 )
|
||||
@@ -1852,7 +1851,7 @@ int64_t hush_coinsupply(int64_t *zfundsp,int64_t *sproutfundsp,int32_t height)
|
||||
if ( pindex->newcoins == 0 && pindex->zfunds == 0 )
|
||||
{
|
||||
if ( hush_blockload(block,pindex) == 0 ) {
|
||||
pindex->newcoins = hush_newcoins(&pindex->zfunds,&pindex->sproutfunds,pindex->GetHeight(),&block);
|
||||
pindex->newcoins = hush_newcoins(&pindex->zfunds,pindex->GetHeight(),&block);
|
||||
} else {
|
||||
fprintf(stderr,"error loading block.%d\n",pindex->GetHeight());
|
||||
return(0);
|
||||
@@ -1860,13 +1859,11 @@ int64_t hush_coinsupply(int64_t *zfundsp,int64_t *sproutfundsp,int32_t height)
|
||||
}
|
||||
supply += pindex->newcoins;
|
||||
zfunds += pindex->zfunds;
|
||||
sproutfunds += pindex->sproutfunds;
|
||||
//printf("start ht.%d new %.8f -> supply %.8f zfunds %.8f -> %.8f\n",pindex->GetHeight(),dstr(pindex->newcoins),dstr(supply),dstr(pindex->zfunds),dstr(zfunds));
|
||||
pindex = pindex->pprev;
|
||||
}
|
||||
}
|
||||
*zfundsp = zfunds;
|
||||
*sproutfundsp = sproutfunds;
|
||||
return(supply);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user