refactor: use CHECK_NONFATAL to avoid single-use symbol

This commit is contained in:
Sjors Provoost committed 2024-06-27 08:58:24 +02:00
1 parent 5fb2b70489
commit f6dc6db44d
1 file changed
+1 -3
+1 -3
View File
@@ -667,9 +667,7 @@ static RPCHelpMan getblocktemplate()
ChainstateManager& chainman = EnsureChainman(node);
Mining& miner = EnsureMining(node);
LOCK(cs_main);
std::optional<uint256> maybe_tip{miner.getTipHash()};
CHECK_NONFATAL(maybe_tip);
uint256 tip{maybe_tip.value()};
uint256 tip{CHECK_NONFATAL(miner.getTipHash()).value()};
std::string strMode = "template";
UniValue lpval = NullUniValue;