This commit is contained in:
jl777
2018-02-13 21:33:49 +02:00
parent 8683bd8d11
commit 9757c8f97e
2 changed files with 6 additions and 6 deletions

View File

@@ -1572,7 +1572,7 @@ void komodo_args(char *argv0)
}
if ( ASSETCHAINS_ENDSUBSIDY != 0 || ASSETCHAINS_REWARD != 0 || ASSETCHAINS_HALVING != 0 || ASSETCHAINS_DECAY != 0 || ASSETCHAINS_COMMISSION != 0 )
{
printf("end.%d reward.%llu halving.%llu decay.%llu perc.%llu\n",ASSETCHAINS_ENDSUBSIDY,(long long)ASSETCHAINS_REWARD,(long long)ASSETCHAINS_HALVING,(long long)ASSETCHAINS_DECAY,(long long)ASSETCHAINS_COMMISSION);
printf("end.%llu reward.%llu halving.%llu decay.%llu perc.%llu\n",(long long)ASSETCHAINS_ENDSUBSIDY,(long long)ASSETCHAINS_REWARD,(long long)ASSETCHAINS_HALVING,(long long)ASSETCHAINS_DECAY,(long long)ASSETCHAINS_COMMISSION);
extraptr = extrabuf;
memcpy(extraptr,ASSETCHAINS_OVERRIDE_PUBKEY33,33), extralen = 33;
extralen += iguana_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_ENDSUBSIDY),(void *)&ASSETCHAINS_ENDSUBSIDY);

View File

@@ -1493,7 +1493,7 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex)
//uint64_t komodo_moneysupply(int32_t height);
extern char ASSETCHAINS_SYMBOL[KOMODO_ASSETCHAIN_MAXLEN];
extern uint32_t ASSETCHAINS_MAGIC;
extern uint64_t ASSETCHAINS_ENDSUBSIDY,ASSETCHAINS_REWARD,ASSETCHAINS_HALVING,ASSETCHAINS_LINEAR,ASSETCHAINS_COMMISSION,ASSETCHAINS_SUPPLY = 10;
extern uint64_t ASSETCHAINS_ENDSUBSIDY,ASSETCHAINS_REWARD,ASSETCHAINS_HALVING,ASSETCHAINS_LINEAR,ASSETCHAINS_COMMISSION,ASSETCHAINS_SUPPLY;
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
@@ -1514,7 +1514,7 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
if ( ASSETCHAINS_REWARD == 0 )
return(10000);
else if ( ASSETCHAINS_ENDHEIGHT != 0 && nHeight >= ASSETCHAINS_ENDHEIGHT )
else if ( ASSETCHAINS_ENDSUBSIDY != 0 && nHeight >= ASSETCHAINS_ENDSUBSIDY )
return(0);
else
{
@@ -1527,10 +1527,10 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
return(0);
if ( ASSETCHAINS_DECAY == 0 )
nSubsidy >>= numhalvings;
else if ( ASSETCHAINS_DECAY == 100000000 && ASSETCHAINS_ENDHEIGHT != 0 )
else if ( ASSETCHAINS_DECAY == 100000000 && ASSETCHAINS_ENDSUBSIDY != 0 )
{
numerator = (ASSETCHAINS_ENDHEIGHT - nHeight);
nSubsidy = (nSubidy * numerator) / ASSETCHAINS_ENDHEIGHT;
numerator = (ASSETCHAINS_ENDSUBSIDY - nHeight);
nSubsidy = (nSubidy * numerator) / ASSETCHAINS_ENDSUBSIDY;
}
else
{