bugfix: Strict type checking for RPC boolean parameters

This commit is contained in:
MarcoFalke
2022-12-05 15:15:36 +01:00
parent 9052d869c9
commit fa2cc5d1d6
4 changed files with 14 additions and 8 deletions

View File

@@ -1651,11 +1651,8 @@ RPCHelpMan walletcreatefundedpsbt()
CAmount fee;
int change_position;
bool rbf{wallet.m_signal_rbf};
const UniValue &replaceable_arg = options["replaceable"];
if (!replaceable_arg.isNull()) {
rbf = replaceable_arg.isTrue();
}
const bool rbf{replaceable_arg.isNull() ? wallet.m_signal_rbf : replaceable_arg.get_bool()};
CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], rbf);
CCoinControl coin_control;
// Automatically select coins, unless at least one is manually selected. Can