diff --git a/src/dfi/mn_rpc.cpp b/src/dfi/mn_rpc.cpp index 4a38e3bf7a..d7c704ce67 100644 --- a/src/dfi/mn_rpc.cpp +++ b/src/dfi/mn_rpc.cpp @@ -632,6 +632,10 @@ UniValue setgov(const JSONRPCRequest &request) { throw JSONRPCError(RPC_INVALID_REQUEST, "Cannot set consortium on DFI, loan tokens and non-DAT tokens"); } + } else if (Params().NetworkIDString() != CBaseChainParams::REGTEST && + attrV0->type == AttributeTypes::Oracles && attrV0->typeId == OracleIDs::Splits) { + // Note: This is expected to be removed after DF23 + throw JSONRPCError(RPC_INVALID_REQUEST, "Token splits disabled"); } } } @@ -867,6 +871,9 @@ UniValue setgovheight(const JSONRPCRequest &request) { throw JSONRPCError(RPC_INVALID_REQUEST, "Cannot set consortium on DFI, loan tokens and non-DAT tokens"); } + } else if (Params().NetworkIDString() != CBaseChainParams::REGTEST && + attrV0->type == AttributeTypes::Oracles && attrV0->typeId == OracleIDs::Splits) { + throw JSONRPCError(RPC_INVALID_REQUEST, "Token splits disabled"); } } } diff --git a/src/dfi/rpc_tokens.cpp b/src/dfi/rpc_tokens.cpp index 73e3a14be8..c512c83bf6 100644 --- a/src/dfi/rpc_tokens.cpp +++ b/src/dfi/rpc_tokens.cpp @@ -272,6 +272,10 @@ UniValue updatetoken(const JSONRPCRequest &request) { if (!token) { throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Token %s does not exist!", tokenStr)); } + // Note: This is expected to be removed after DF23 + if (Params().NetworkIDString() != CBaseChainParams::REGTEST && token->IsDAT()) { + throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot update DAT token"); + } tokenImpl = static_cast(*token); if (tokenImpl.IsPoolShare()) { throw JSONRPCError(RPC_INVALID_PARAMETER,