less debug
This commit is contained in:
@@ -1628,7 +1628,7 @@ uint64_t hush_sc_block_subsidy(int nHeight)
|
|||||||
int32_t numhalvings = 0, curEra = 0, sign = 1;
|
int32_t numhalvings = 0, curEra = 0, sign = 1;
|
||||||
static uint64_t cached_subsidy; static int32_t cached_numhalvings; static int cached_era;
|
static uint64_t cached_subsidy; static int32_t cached_numhalvings; static int cached_era;
|
||||||
bool ishush3 = strncmp(SMART_CHAIN_SYMBOL, "HUSH3",5) == 0 ? true : false;
|
bool ishush3 = strncmp(SMART_CHAIN_SYMBOL, "HUSH3",5) == 0 ? true : false;
|
||||||
fprintf(stderr,"%s: ht=%d ishush3=%d\n", __func__, nHeight, ishush3);
|
// fprintf(stderr,"%s: ht=%d ishush3=%d\n", __func__, nHeight, ishush3);
|
||||||
|
|
||||||
// check for backwards compat, older chains with no explicit rewards had 0.0001 block reward
|
// check for backwards compat, older chains with no explicit rewards had 0.0001 block reward
|
||||||
if ( ASSETCHAINS_ENDSUBSIDY[0] == 0 && ASSETCHAINS_REWARD[0] == 0 ) {
|
if ( ASSETCHAINS_ENDSUBSIDY[0] == 0 && ASSETCHAINS_REWARD[0] == 0 ) {
|
||||||
@@ -1649,7 +1649,7 @@ uint64_t hush_sc_block_subsidy(int nHeight)
|
|||||||
{
|
{
|
||||||
int64_t nStart = curEra ? ASSETCHAINS_ENDSUBSIDY[curEra - 1] : 0;
|
int64_t nStart = curEra ? ASSETCHAINS_ENDSUBSIDY[curEra - 1] : 0;
|
||||||
subsidy = (int64_t)ASSETCHAINS_REWARD[curEra];
|
subsidy = (int64_t)ASSETCHAINS_REWARD[curEra];
|
||||||
//if(fDebug)
|
if(fDebug)
|
||||||
fprintf(stderr,"%s: nStart.%ld subsidy.%ld curEra.%d\n",__func__,nStart,subsidy,curEra);
|
fprintf(stderr,"%s: nStart.%ld subsidy.%ld curEra.%d\n",__func__,nStart,subsidy,curEra);
|
||||||
|
|
||||||
if ( subsidy || (curEra != ASSETCHAINS_LASTERA && ASSETCHAINS_REWARD[curEra + 1] != 0) )
|
if ( subsidy || (curEra != ASSETCHAINS_LASTERA && ASSETCHAINS_REWARD[curEra + 1] != 0) )
|
||||||
@@ -1665,7 +1665,7 @@ uint64_t hush_sc_block_subsidy(int nHeight)
|
|||||||
// The code below is not compatible with HUSH3 mainnet
|
// The code below is not compatible with HUSH3 mainnet
|
||||||
if ( ASSETCHAINS_DECAY[curEra] == 0 ) {
|
if ( ASSETCHAINS_DECAY[curEra] == 0 ) {
|
||||||
subsidy >>= numhalvings;
|
subsidy >>= numhalvings;
|
||||||
fprintf(stderr,"%s: no decay, numhalvings.%d curEra.%d subsidy.%ld nStart.%ld\n",__func__, numhalvings, curEra, subsidy, nStart);
|
// fprintf(stderr,"%s: no decay, numhalvings.%d curEra.%d subsidy.%ld nStart.%ld\n",__func__, numhalvings, curEra, subsidy, nStart);
|
||||||
} else if ( ASSETCHAINS_DECAY[curEra] == 100000000 && ASSETCHAINS_ENDSUBSIDY[curEra] != 0 ) {
|
} else if ( ASSETCHAINS_DECAY[curEra] == 100000000 && ASSETCHAINS_ENDSUBSIDY[curEra] != 0 ) {
|
||||||
if ( curEra == ASSETCHAINS_LASTERA )
|
if ( curEra == ASSETCHAINS_LASTERA )
|
||||||
{
|
{
|
||||||
@@ -1723,7 +1723,7 @@ uint64_t hush_sc_block_subsidy(int nHeight)
|
|||||||
else
|
else
|
||||||
subsidy += ASSETCHAINS_SUPPLY * SATOSHIDEN + magicExtra;
|
subsidy += ASSETCHAINS_SUPPLY * SATOSHIDEN + magicExtra;
|
||||||
}
|
}
|
||||||
//if(fDebug)
|
if(fDebug)
|
||||||
fprintf(stderr,"%s: ht.%d curEra.%d lastEra.%lu subsidy.%ld magicExtra.%u\n",__func__,nHeight,curEra,ASSETCHAINS_LASTERA,subsidy,magicExtra);
|
fprintf(stderr,"%s: ht.%d curEra.%d lastEra.%lu subsidy.%ld magicExtra.%u\n",__func__,nHeight,curEra,ASSETCHAINS_LASTERA,subsidy,magicExtra);
|
||||||
return(subsidy);
|
return(subsidy);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
./src/hushd -ac_randomx_interval=10 -ac_randomx_lag=3 -ac_halving=20 -ac_algo=randomx -ac_name=RANDOMX8 -ac_private=1 -ac_blocktime=20 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1
|
./src/hushd -ac_randomx_interval=10 -ac_randomx_lag=3 -ac_halving=20 -ac_algo=randomx -ac_name=RANDOMX9 -ac_private=1 -ac_blocktime=20 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1
|
||||||
|
|
||||||
# to run via the debugger
|
# to run via the debugger
|
||||||
# type "run" when gdb prompt appears
|
# type "run" when gdb prompt appears
|
||||||
|
|||||||
Reference in New Issue
Block a user