Merge fc06881f13 into merged_master (Bitcoin PR bitcoin/bitcoin#27491)

This commit is contained in:
Byron Hambly 2025-05-23 13:02:22 +02:00
commit cbd7b123d9
93 changed files with 546 additions and 303 deletions

View file

@ -21,6 +21,7 @@
#include <rpc/util.h>
#include <sync.h>
#include <timedata.h>
#include <util/chaintype.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/time.h>
@ -354,7 +355,7 @@ static RPCHelpMan addconnection()
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
if (Params().NetworkIDString().find("regtest") == std::string::npos) {
if (Params().GetChainTypeMeta().chain_name.find("regtest") == std::string::npos) {
throw std::runtime_error("addconnection is for regression testing (chain should have \"regtest\" in the name) only.");
}