You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!request.params[1].isNull() && request.params[1].get_bool()) {
1150
-
max_raw_tx_fee = 0;
1152
+
CAmount max_raw_tx_fee = maxTxFee;
1153
+
// TODO: temporary migration code for old clients. Remove in v0.20
1154
+
if (request.params[1].isBool()) {
1155
+
throwJSONRPCError(RPC_INVALID_PARAMETER, "Second argument must be numeric (maxfeerate) and no longer supports a boolean. To allow a transaction with high fees, set maxfeerate to 0.");
1156
+
} elseif (request.params[1].isNum()) {
1157
+
size_t weight = GetTransactionWeight(*tx);
1158
+
CFeeRate fr(AmountFromValue(request.params[1]));
1159
+
// the +3/4 part rounds the value up, and is the same formula used when
1160
+
// calculating the fee for a transaction
1161
+
// (see GetVirtualTransactionSize)
1162
+
max_raw_tx_fee = fr.GetFee((weight+3)/4);
1163
+
} elseif (!request.params[1].isNull()) {
1164
+
throwJSONRPCError(RPC_INVALID_PARAMETER, "second argument (maxfeerate) must be numeric");
0 commit comments