mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge pull request #928 from stevenroose/already-have-block
Have testproposedblock return RPC_VERIFY_ALREADY_IN_CHAIN
This commit is contained in:
commit
679f620a07
1 changed files with 1 additions and 1 deletions
|
|
@ -1734,7 +1734,7 @@ static RPCHelpMan testproposedblock()
|
||||||
uint256 hash = block.GetHash();
|
uint256 hash = block.GetHash();
|
||||||
BlockMap::iterator mi = chainman.BlockIndex().find(hash);
|
BlockMap::iterator mi = chainman.BlockIndex().find(hash);
|
||||||
if (mi != chainman.BlockIndex().end())
|
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();
|
CBlockIndex* const pindexPrev = chainman.ActiveChain().Tip();
|
||||||
// TestBlockValidity only supports blocks built on the current Tip
|
// TestBlockValidity only supports blocks built on the current Tip
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue