From b572ef02283cbf27078aae76a5b08eedec6b920a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 7 Sep 2020 18:40:51 -0400 Subject: [PATCH] Calculate this value at run-time because it's not set yet when this header file is parsed --- src/komodo_utils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 252da087f..2c56dad33 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1634,7 +1634,6 @@ uint64_t komodo_ac_block_subsidy(int nHeight) return(subsidy); } -extern bool ishush3; extern int64_t MAX_MONEY; void komodo_cbopretupdate(int32_t forceflag); void SplitStr(const std::string& strVal, std::vector &outVals); @@ -1813,6 +1812,9 @@ void komodo_args(char *argv0) Split(GetArg("-ac_end",""), sizeof(ASSETCHAINS_ENDSUBSIDY)/sizeof(*ASSETCHAINS_ENDSUBSIDY), ASSETCHAINS_ENDSUBSIDY, 0); Split(GetArg("-ac_halving",""), sizeof(ASSETCHAINS_HALVING)/sizeof(*ASSETCHAINS_HALVING), ASSETCHAINS_HALVING, 0); Split(GetArg("-ac_reward",""), sizeof(ASSETCHAINS_REWARD)/sizeof(*ASSETCHAINS_REWARD), ASSETCHAINS_REWARD, 0); + + bool ishush3 = strncmp(ASSETCHAINS_SYMBOL, "HUSH3",5) == 0 ? true : false; + if(ishush3) { // Over-ride HUSH3 values from CLI params. Changing our blocktime to 75s changes things ASSETCHAINS_REWARD[0] = 0;