From e0651983bc722748437db3767b3dd895b027fa3f Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 2 Jul 2022 11:11:51 -0400 Subject: [PATCH] less debug --- src/hush_utils.h | 8 ++++---- test_randomx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hush_utils.h b/src/hush_utils.h index 19deeeadb..b2e3e4903 100644 --- a/src/hush_utils.h +++ b/src/hush_utils.h @@ -1628,7 +1628,7 @@ uint64_t hush_sc_block_subsidy(int nHeight) int32_t numhalvings = 0, curEra = 0, sign = 1; 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; - 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 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; subsidy = (int64_t)ASSETCHAINS_REWARD[curEra]; - //if(fDebug) + if(fDebug) fprintf(stderr,"%s: nStart.%ld subsidy.%ld curEra.%d\n",__func__,nStart,subsidy,curEra); 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 if ( ASSETCHAINS_DECAY[curEra] == 0 ) { 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 ) { if ( curEra == ASSETCHAINS_LASTERA ) { @@ -1723,7 +1723,7 @@ uint64_t hush_sc_block_subsidy(int nHeight) else 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); return(subsidy); } diff --git a/test_randomx b/test_randomx index e525bbb01..4d783f4c4 100755 --- a/test_randomx +++ b/test_randomx @@ -1,6 +1,6 @@ #!/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 # type "run" when gdb prompt appears