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:
@@ -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<uint8_t> Mineropret;
|
||||
std::vector<std::string> vAllowListAddress;
|
||||
char NOTARYADDRS[64][64];
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user