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
// TODO: temporary migration code for old clients. Remove in v0.20
1091
1091
if (request.params[1].isBool()) {
1092
1092
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.");
1093
-
} elseif (request.params[1].isNum()) {
1093
+
} elseif (!request.params[1].isNull()) {
1094
1094
size_t weight = GetTransactionWeight(*tx);
1095
1095
CFeeRate fr(AmountFromValue(request.params[1]));
1096
1096
// the +3/4 part rounds the value up, and is the same formula used when
1097
1097
// calculating the fee for a transaction
1098
1098
// (see GetVirtualTransactionSize)
1099
1099
max_raw_tx_fee = fr.GetFee((weight+3)/4);
1100
-
} elseif (!request.params[1].isNull()) {
1101
-
throwJSONRPCError(RPC_INVALID_PARAMETER, "second argument (maxfeerate) must be numeric");
// TODO: temporary migration code for old clients. Remove in v0.20
1173
1171
if (request.params[1].isBool()) {
1174
1172
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.");
1175
-
} elseif (request.params[1].isNum()) {
1173
+
} elseif (!request.params[1].isNull()) {
1176
1174
size_t weight = GetTransactionWeight(*tx);
1177
1175
CFeeRate fr(AmountFromValue(request.params[1]));
1178
1176
// the +3/4 part rounds the value up, and is the same formula used when
1179
1177
// calculating the fee for a transaction
1180
1178
// (see GetVirtualTransactionSize)
1181
1179
max_raw_tx_fee = fr.GetFee((weight+3)/4);
1182
-
} elseif (!request.params[1].isNull()) {
1183
-
throwJSONRPCError(RPC_INVALID_PARAMETER, "second argument (maxfeerate) must be numeric");
0 commit comments