Refactor: Replace 'isMockableChain' with inline 'ChainType' check for 'submitpackage'

This commit is contained in:
Tim Neubauer committed 2023-09-15 16:32:11 +02:00
1 parent 27b4084e16
commit 78c2707b2a
1 file changed
+1 -1
+1 -1
View File
@@ -862,7 +862,7 @@ static RPCHelpMan submitpackage()
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
if (!Params().IsMockableChain()) {
if (Params().GetChainType() != ChainType::REGTEST) {
throw std::runtime_error("submitpackage is for regression testing (-regtest mode) only");
}
const UniValue raw_transactions = request.params[0].get_array();