change rpc enablement mechanism

This commit is contained in:
Brannon King 2019-09-11 09:06:08 -06:00
parent b434864f18
commit f176db058e

View file

@ -935,7 +935,7 @@ UniValue supportclaim(const JSONRPCRequest& request)
if (!hex.empty()) {
if (!IsHex(hex))
throw JSONRPCError(RPC_INVALID_PARAMETER, "value/metadata must be of hexadecimal data");
if (!IsWitnessEnabled(chainActive.Tip(), Params().GetConsensus()))
if (!trieCache.allowSupportMetadata())
throw JSONRPCError(RPC_INVALID_PARAMETER, "value/metadata on supports is not enabled yet");
supportScript = supportScript << ParseHex(hex);
lastOp = OP_2DROP;