diff --git a/src/hush_globals.h b/src/hush_globals.h index 8989cc4ce..128d719da 100644 --- a/src/hush_globals.h +++ b/src/hush_globals.h @@ -51,6 +51,7 @@ std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_OVERRIDE_PUBKEY,DONAT uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEYHASH[20],ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE,ASSETCHAINS_TXPOW,ASSETCHAINS_MARMARA; int8_t ASSETCHAINS_ADAPTIVEPOW; uint8_t ASSETCHAINS_BURN = 0; +uint32_t ASSETCHAINS_MINOPRETURNFEE = 0; std::vector Mineropret; std::vector vAllowListAddress; char NOTARYADDRS[64][64]; diff --git a/src/hush_utils.h b/src/hush_utils.h index 835a5a5a3..e2d6a7968 100644 --- a/src/hush_utils.h +++ b/src/hush_utils.h @@ -1842,7 +1842,8 @@ void hush_args(char *argv0) Split(GetArg("-ac_nk",""), sizeof(ASSETCHAINS_NK)/sizeof(*ASSETCHAINS_NK), ASSETCHAINS_NK, 0); ASSETCHAINS_BURN = GetArg("-ac_burn", 0); - + ASSETCHAINS_MINOPRETURNFEE = GetArg("-ac_minopreturnfee", 0); + // -ac_ccactivateht=evalcode,height,evalcode,height,evalcode,height.... Split(GetArg("-ac_ccactivateht",""), sizeof(ccEnablesHeight)/sizeof(*ccEnablesHeight), ccEnablesHeight, 0); // fill map with all eval codes and activation height of 0. @@ -1858,7 +1859,7 @@ void hush_args(char *argv0) fprintf(stderr, "ac_ccactivateht: invalid evalcode.%i must be between 0 and 256.\n", ecode); else if ( ht > 0 ) { - // update global map. + // update global map. mapHeightEvalActivate[ecode] = ht; fprintf(stderr, "ac_ccactivateht: ecode.%i activates at height.%i\n", ecode, mapHeightEvalActivate[ecode]); } diff --git a/src/init.cpp b/src/init.cpp index d5e68103c..1215e2f66 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -604,6 +604,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-ac_blocktime", _("Block time in seconds, default is 60")); strUsage += HelpMessageOpt("-ac_beam", _("BEAM integration")); strUsage += HelpMessageOpt("-ac_burn", _("Allow sending funds to the transparent burn address when -ac_private=1")); + strUsage += HelpMessageOpt("-ac_minopreturnfee", _("OP_RETURN fee per tx, regardless of tx size, default is 1 coin")); strUsage += HelpMessageOpt("-ac_coda", _("CODA integration")); strUsage += HelpMessageOpt("-ac_decay", _("Percentage of block reward decrease at each halving")); strUsage += HelpMessageOpt("-ac_end", _("Block height at which block rewards will end")); diff --git a/src/miner.cpp b/src/miner.cpp index 062354240..acf0068c1 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -118,6 +118,7 @@ public: extern int8_t ASSETCHAINS_ADAPTIVEPOW; extern uint32_t ASSETCHAINS_RANDOMX; +extern uint32_t ASSETCHAINS_MINOPRETURNFEE; extern bool fRandomXDebug; extern std::string devtax_scriptpub_for_height(uint32_t nHeight); @@ -521,6 +522,11 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32 // Opret spam limits CAmount opretMinFee = 1 * COIN; + // Set with -ac_minopreturnfee + if (ASSETCHAINS_MINOPRETURNFEE > 0) { + opretMinFee = ASSETCHAINS_MINOPRETURNFEE; + } + { bool fSpamTx = false; unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);