Skip to content

Commit

Permalink
fix: refuse to create new clsig if chain tip has changed while we wer…
Browse files Browse the repository at this point in the history
…e signing
  • Loading branch information
UdjinM6 committed Dec 20, 2024
1 parent dd96032 commit d141f1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/llmq/chainlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,10 @@ MessageProcessingResult CChainLocksHandler::HandleNewRecoveredSig(const llmq::CR
// already got the same or a better CLSIG through the CLSIG message
return {};
}

if (m_chainstate.m_chain.Tip()->GetBlockHash() != lastSignedMsgHash) {
// chain tip has changed while we were signing
return {};
}

clsig = CChainLockSig(lastSignedHeight, lastSignedMsgHash, recoveredSig.sig.Get());
}
Expand Down

0 comments on commit d141f1f

Please sign in to comment.