From 323cfed5959b25c98235ec988b408fc5e3391e3c Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 28 Jun 2024 10:35:13 +0200 Subject: [PATCH] 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 7e420dcd9b5..e16f75ab781 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -778,9 +778,7 @@ static RPCHelpMan getblocktemplate() } ENTER_CRITICAL_SECTION(cs_main); - std::optional maybe_tip{miner.getTipHash()}; - CHECK_NONFATAL(maybe_tip); - tip = maybe_tip.value(); + tip = CHECK_NONFATAL(miner.getTipHash()).value(); if (!IsRPCRunning()) throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Shutting down");