diff options
author | Sjors Provoost <sjors@sprovoost.nl> | 2024-06-26 12:29:33 +0200 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2024-06-27 08:58:24 +0200 |
commit | f6dc6db44ddc22ade96a69a02908f14cfb279a37 (patch) | |
tree | a7cfb809ba4c11dc802b8751e3be1eb2124b1a54 | |
parent | 5fb2b704897fe10b5bd5ed754a5afd2ddc4a9e1d (diff) |
refactor: use CHECK_NONFATAL to avoid single-use symbol
-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; |