322@@ -323,11 +323,13 @@ UniValue createmultisig(const UniValue& params, bool fHelp)
323
324 UniValue createwitnessaddress(const UniValue& params, bool fHelp)
325 {
326- if (fHelp || params.size() < 1 || params.size() > 1)
327+ if (fHelp || params.size() < 1 || params.size() > 1 || Params().NetworkIDString() == "main")
Please don’t do a string test on the chain params. If you need a specific condition, add a ChainParams::AllowCreateWitness method or so.
Also, is there any need to not just remove the RPC entirely?
Just not sure if that’s useful for testing. Should we keep it for test only or remove it entirely? I don’t have strong opinion.