fa1ad200d3 doc: Add release notes for 15620 (MarcoFalke)
fa96d76421 rpc: Uncouple rpcs from maxTxFee global (MarcoFalke)
fa965e03c7 rpc: Use IsValidNumArgs over hardcoded size checks (MarcoFalke)
Pull request description:
This makes the rpcs a bit more stateless by falling back to their own default max fee instead of the global maxTxFee.
A follow up pull request will move `-maxtxfee` to the wallet.
See also related discussions:
* `-maxtxfee` should not be used by both node and wallet #15355
* [RFC] Long term plan for wallet command-line args #13044
ACKs for commit fa1ad2:
jnewbery:
utACK fa1ad200d3
Empact:
utACK fa1ad200d3
jnewbery:
utACK fa1ad200d3
promag:
utACK fa1ad20.
Tree-SHA512: c9cf0b54cd30ff3ab0d090b072cc38fcbb2840bc6ad9a9711995333bc927d2500aece6b5a60e061666eca5ed72b70aa318d21e51eb15ee0106b41f5b6e4e1adf
gArgs.AddArg("-mocktime=<n>","Replace actual time with <n> seconds since epoch (default: 0)",true,OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-maxsigcachesize=<n>",strprintf("Limit sum of signature cache and script execution cache sizes to <n> MiB (default: %u)",DEFAULT_MAX_SIG_CACHE_SIZE),true,OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-maxtipage=<n>",strprintf("Maximum tip age in seconds to consider node in initial block download (default: %u)",DEFAULT_MAX_TIP_AGE),true,OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-maxtxfee=<amt>",strprintf("Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)",
gArgs.AddArg("-maxtxfee=<amt>",strprintf("Maximum total fees (in %s) to use in a single wallet transaction; setting this too low may abort large transactions (default: %s)",// TODO move setting to wallet
gArgs.AddArg("-printpriority",strprintf("Log transaction fee per kB when mining blocks (default: %u)",DEFAULT_PRINTPRIORITY),true,OptionsCategory::DEBUG_TEST);
gArgs.AddArg("-printtoconsole","Send trace/debug info to console (default: 1 when no -daemon. To disable logging to file, set -nodebuglogfile)",false,OptionsCategory::DEBUG_TEST);
"\nSubmits raw transaction (serialized, hex-encoded) to local node and network.\n"
"\nAlso see createrawtransaction and signrawtransactionwithkey calls.\n",
{
{"hexstring",RPCArg::Type::STR_HEX,RPCArg::Optional::NO,"The hex string of the raw transaction"},
{"maxfeerate",RPCArg::Type::AMOUNT,/* default */FormatMoney(maxTxFee),"Reject transactions whose fee rate is higher than the specified value, expressed in "+CURRENCY_UNIT+"/kB\n"},
{"maxfeerate",RPCArg::Type::AMOUNT,/* default */FormatMoney(DEFAULT_MAX_RAW_TX_FEE),"Reject transactions whose fee rate is higher than the specified value, expressed in "+CURRENCY_UNIT+"/kB\n"},
// TODO: temporary migration code for old clients. Remove in v0.20
if(request.params[1].isBool()){
throwJSONRPCError(RPC_INVALID_PARAMETER,"Second argument must be numeric (maxfeerate)andnolongersupportsaboolean.Toallowatransactionwithhighfees,setmaxfeerateto0.");
{"maxfeerate",RPCArg::Type::AMOUNT,/* default */FormatMoney(maxTxFee),"Reject transactions whose fee rate is higher than the specified value, expressed in "+CURRENCY_UNIT+"/kB\n"},
{"maxfeerate",RPCArg::Type::AMOUNT,/* default */FormatMoney(DEFAULT_MAX_RAW_TX_FEE),"Reject transactions whose fee rate is higher than the specified value, expressed in "+CURRENCY_UNIT+"/kB\n"},
},
RPCResult{
"[ (array) The result of the mempool acceptance test for each raw transaction in the input array.\n"
// TODO: temporary migration code for old clients. Remove in v0.20
if(request.params[1].isBool()){
throwJSONRPCError(RPC_INVALID_PARAMETER,"Second argument must be numeric (maxfeerate)andnolongersupportsaboolean.Toallowatransactionwithhighfees,setmaxfeerateto0.");