refactor: use CHECK_NONFATAL to avoid single-use symbol
This commit is contained in:
1 file changed
+1
-3
+1
-3
@@ -667,9 +667,7 @@ static RPCHelpMan getblocktemplate()
|
|||||||
ChainstateManager& chainman = EnsureChainman(node);
|
ChainstateManager& chainman = EnsureChainman(node);
|
||||||
Mining& miner = EnsureMining(node);
|
Mining& miner = EnsureMining(node);
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
std::optional<uint256> maybe_tip{miner.getTipHash()};
|
uint256 tip{CHECK_NONFATAL(miner.getTipHash()).value()};
|
||||||
CHECK_NONFATAL(maybe_tip);
|
|
||||||
uint256 tip{maybe_tip.value()};
|
|
||||||
|
|
||||||
std::string strMode = "template";
|
std::string strMode = "template";
|
||||||
UniValue lpval = NullUniValue;
|
UniValue lpval = NullUniValue;
|
||||||
|
|||||||
Reference in new issue
Block a user