Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/llmq/chainlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ MessageProcessingResult CChainLocksHandler::HandleNewRecoveredSig(const llmq::CR
// already got the same or a better CLSIG through the CLSIG message
return {};
}

const auto pindex = m_chainstate.m_chain.Tip()->GetAncestor(lastSignedHeight);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we will have a new chainlock we need to switch chain here to the new one, because it is a new chain-locked tip and current tip should be refused, isn't it true?

if (pindex == nullptr || pindex->GetBlockHash() != lastSignedMsgHash) {
// we switched to a different fork while we were signing
return {};
}

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