mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 915ac8a861 into merged_master (Bitcoin PR #19413)
This commit is contained in:
commit
8e770d3f21
7 changed files with 37 additions and 42 deletions
|
|
@ -1641,11 +1641,12 @@ UniValue testproposedblock(const JSONRPCRequest& request)
|
|||
if (!DecodeHexBlk(block, request.params[0].get_str()))
|
||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");
|
||||
|
||||
ChainstateManager& chainman = EnsureChainman(request.context);
|
||||
LOCK(cs_main);
|
||||
|
||||
uint256 hash = block.GetHash();
|
||||
BlockMap::iterator mi = ::BlockIndex().find(hash);
|
||||
if (mi != ::BlockIndex().end())
|
||||
BlockMap::iterator mi = chainman.BlockIndex().find(hash);
|
||||
if (mi != chainman.BlockIndex().end())
|
||||
throw JSONRPCError(RPC_VERIFY_ERROR, "already have block");
|
||||
|
||||
CBlockIndex* const pindexPrev = ::ChainActive().Tip();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue