Skip to content

Commit 679f620

Browse files
authored
Merge pull request #928 from stevenroose/already-have-block
Have testproposedblock return RPC_VERIFY_ALREADY_IN_CHAIN
2 parents 5c82e35 + 30f0262 commit 679f620

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)