mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge ef19a193fc into merged_master (Bitcoin PR bitcoin/bitcoin#30356)
This commit is contained in:
commit
9cfa8d130d
6 changed files with 42 additions and 19 deletions
|
|
@ -392,7 +392,7 @@ static RPCHelpMan generateblock()
|
|||
|
||||
ChainstateManager& chainman = EnsureChainman(node);
|
||||
{
|
||||
std::unique_ptr<CBlockTemplate> blocktemplate{miner.createNewBlock(coinbase_script, /*use_mempool=*/false)};
|
||||
std::unique_ptr<CBlockTemplate> blocktemplate{miner.createNewBlock(coinbase_script, {.use_mempool = false})};
|
||||
if (!blocktemplate) {
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");
|
||||
}
|
||||
|
|
@ -801,9 +801,7 @@ static RPCHelpMan getblocktemplate()
|
|||
}
|
||||
ENTER_CRITICAL_SECTION(cs_main);
|
||||
|
||||
std::optional<uint256> maybe_tip{miner.getTipHash()};
|
||||
CHECK_NONFATAL(maybe_tip);
|
||||
tip = maybe_tip.value();
|
||||
tip = CHECK_NONFATAL(miner.getTipHash()).value();
|
||||
|
||||
if (!IsRPCRunning())
|
||||
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Shutting down");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue