From f6dc6db44ddc22ade96a69a02908f14cfb279a37 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 26 Jun 2024 12:29:33 +0200 Subject: refactor: use CHECK_NONFATAL to avoid single-use symbol --- src/rpc/mining.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index fe91d1ed89..d9fd82d708 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -667,9 +667,7 @@ static RPCHelpMan getblocktemplate() ChainstateManager& chainman = EnsureChainman(node); Mining& miner = EnsureMining(node); LOCK(cs_main); - std::optional 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; -- cgit v1.2.3