combineblocksigs should check if signed blocks are active

This commit is contained in:
Gregory Sanders 2018-11-16 13:02:30 -05:00
parent 52cfdca0f7
commit 3e785f2bcc

View file

@ -1005,6 +1005,10 @@ UniValue combineblocksigs(const JSONRPCRequest& request)
+ HelpExampleCli("combineblocksigs", "<hex> [\"signature1\", \"signature2\", ...]")
);
if (!g_signed_blocks) {
throw JSONRPCError(RPC_MISC_ERROR, "Signed blocks are not active for this network.");
}
CBlock block;
if (!DecodeHexBlk(block, request.params[0].get_str()))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");