diff options
-rw-r--r-- | src/rpc/mining.cpp | 4 |
1 files changed, 1 insertions, 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<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; |