Skip to content

Commit 20475ec

Browse files
committed
Have testproposedblock return RPC_VERIFY_ALREADY_IN_CHAIN
Instead of RPC_VERIFY_ERROR when the block is already in the chain.
1 parent 88067dd commit 20475ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rpc/mining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ UniValue testproposedblock(const JSONRPCRequest& request)
14391439
uint256 hash = block.GetHash();
14401440
BlockMap::iterator mi = mapBlockIndex.find(hash);
14411441
if (mi != mapBlockIndex.end())
1442-
throw JSONRPCError(RPC_VERIFY_ERROR, "already have block");
1442+
throw JSONRPCError(RPC_VERIFY_ALREADY_IN_CHAIN, "already have block");
14431443

14441444
CBlockIndex* const pindexPrev = chainActive.Tip();
14451445
// TestBlockValidity only supports blocks built on the current Tip

0 commit comments

Comments
 (0)