Skip to content

Commit 30f0262

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 5c82e35 commit 30f0262

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
@@ -1734,7 +1734,7 @@ static RPCHelpMan testproposedblock()
17341734
uint256 hash = block.GetHash();
17351735
BlockMap::iterator mi = chainman.BlockIndex().find(hash);
17361736
if (mi != chainman.BlockIndex().end())
1737-
throw JSONRPCError(RPC_VERIFY_ERROR, "already have block");
1737+
throw JSONRPCError(RPC_VERIFY_ALREADY_IN_CHAIN, "already have block");
17381738

17391739
CBlockIndex* const pindexPrev = chainman.ActiveChain().Tip();
17401740
// TestBlockValidity only supports blocks built on the current Tip

0 commit comments

Comments
 (0)