Add HAC option -ac_minopreturnfee to change OP_RETURN fee per tx, regardless of tx size, default is 1 coin

This commit is contained in:
jhendrix
2025-05-16 15:03:42 +01:00
parent 1d5c975f2f
commit 5d037f52ff
4 changed files with 11 additions and 2 deletions

View File

@@ -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);