Skip to content

Commit

Permalink
refactor: remove unneeded variable
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Dec 17, 2023
1 parent 11ecc28 commit ad78e3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/llmq/chainlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,8 @@ void CChainLocksHandler::EnforceBestChainLock()
LogPrint(BCLog::CHAINLOCKS, "CChainLocksHandler::%s -- enforcing block %s via CLSIG (%s)\n", __func__, pindex->GetBlockHash().ToString(), clsig.ToString());
m_chainstate.EnforceBlock(dummy_state, pindex);

bool activateNeeded = WITH_LOCK(::cs_main, return m_chainstate.m_chain.Tip()->GetAncestor(currentBestChainLockBlockIndex->nHeight)) != currentBestChainLockBlockIndex;

if (activateNeeded) {
if (/*activateNeeded =*/ WITH_LOCK(::cs_main, return m_chainstate.m_chain.Tip()->GetAncestor(currentBestChainLockBlockIndex->nHeight)) != currentBestChainLockBlockIndex) {
if (!m_chainstate.ActivateBestChain(dummy_state)) {
LogPrintf("CChainLocksHandler::%s -- ActivateBestChain failed: %s\n", __func__, dummy_state.ToString());
return;
Expand Down

0 comments on commit ad78e3e

Please sign in to comment.