Merge 3b5fb6e77a into merged_master (Bitcoin PR bitcoin/bitcoin#26213)

This commit is contained in:
Tom Trevethan 2025-03-26 12:30:53 +00:00
commit 5baaf035fa
5 changed files with 16 additions and 10 deletions

View file

@ -731,9 +731,7 @@ static RPCHelpMan setban()
if (!request.params[2].isNull())
banTime = request.params[2].getInt<int64_t>();
bool absolute = false;
if (request.params[3].isTrue())
absolute = true;
const bool absolute{request.params[3].isNull() ? false : request.params[3].get_bool()};
if (isSubnet) {
node.banman->Ban(subNet, banTime, absolute);
@ -942,7 +940,7 @@ static RPCHelpMan addpeeraddress()
const std::string& addr_string{request.params[0].get_str()};
const auto port{request.params[1].getInt<uint16_t>()};
const bool tried{request.params[2].isTrue()};
const bool tried{request.params[2].isNull() ? false : request.params[2].get_bool()};
UniValue obj(UniValue::VOBJ);
CNetAddr net_addr;