Skip to content

Commit 323cfed

Browse files
committed
refactor: use CHECK_NONFATAL to avoid single-use symbol
1 parent 8426e01 commit 323cfed

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
@@ -778,9 +778,7 @@ static RPCHelpMan getblocktemplate()
778778
}
779779
ENTER_CRITICAL_SECTION(cs_main);
780780

781-
std::optional<uint256> maybe_tip{miner.getTipHash()};
782-
CHECK_NONFATAL(maybe_tip);
783-
tip = maybe_tip.value();
781+
tip = CHECK_NONFATAL(miner.getTipHash()).value();
784782

785783
if (!IsRPCRunning())
786784
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Shutting down");

0 commit comments

Comments
 (0)