Skip to content

Commit f6dc6db

Browse files
committed
refactor: use CHECK_NONFATAL to avoid single-use symbol
1 parent 5fb2b70 commit f6dc6db

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/rpc/mining.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,7 @@ static RPCHelpMan getblocktemplate()
667667
ChainstateManager& chainman = EnsureChainman(node);
668668
Mining& miner = EnsureMining(node);
669669
LOCK(cs_main);
670-
std::optional<uint256> maybe_tip{miner.getTipHash()};
671-
CHECK_NONFATAL(maybe_tip);
672-
uint256 tip{maybe_tip.value()};
670+
uint256 tip{CHECK_NONFATAL(miner.getTipHash()).value()};
673671

674672
std::string strMode = "template";
675673
UniValue lpval = NullUniValue;

0 commit comments

Comments
 (0)