Skip to content

Commit

Permalink
refactor: use CHECK_NONFATAL to avoid single-use symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Jun 27, 2024
1 parent 5fb2b70 commit f6dc6db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f6dc6db

Please sign in to comment.