From 30f02624c70f5918d1bb9c8d9e7d5b9ca341095f Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Wed, 11 Nov 2020 15:56:27 +0000 Subject: [PATCH] Have testproposedblock return RPC_VERIFY_ALREADY_IN_CHAIN Instead of RPC_VERIFY_ERROR when the block is already in the chain. --- src/rpc/mining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 981a85ad25..6ed4612ce0 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -1734,7 +1734,7 @@ static RPCHelpMan testproposedblock() uint256 hash = block.GetHash(); BlockMap::iterator mi = chainman.BlockIndex().find(hash); if (mi != chainman.BlockIndex().end()) - throw JSONRPCError(RPC_VERIFY_ERROR, "already have block"); + throw JSONRPCError(RPC_VERIFY_ALREADY_IN_CHAIN, "already have block"); CBlockIndex* const pindexPrev = chainman.ActiveChain().Tip(); // TestBlockValidity only supports blocks built on the current Tip