@@ -876,7 +876,9 @@ void CSigningManager::UnregisterRecoveredSigsListener(CRecoveredSigsListener* l)
876876 recoveredSigsListeners.erase (itRem, recoveredSigsListeners.end ());
877877}
878878
879- bool CSigningManager::AsyncSignIfMember (Consensus::LLMQType llmqType, CSigSharesManager& shareman, const uint256& id, const uint256& msgHash, const uint256& quorumHash, bool allowReSign)
879+ bool CSigningManager::AsyncSignIfMember (Consensus::LLMQType llmqType, CSigSharesManager& shareman, const uint256& id,
880+ const uint256& msgHash, const uint256& quorumHash, bool allowReSign,
881+ bool allowDiffMsgHashSigning)
880882{
881883 LogPrintf (" CSigningManager::AsyncSignIfMember id=%s\n " , id.ToString ());
882884 if (m_mn_activeman == nullptr ) return false ;
@@ -917,9 +919,15 @@ bool CSigningManager::AsyncSignIfMember(Consensus::LLMQType llmqType, CSigShares
917919 uint256 prevMsgHash;
918920 db.GetVoteForId (llmqType, id, prevMsgHash);
919921 if (msgHash != prevMsgHash) {
920- LogPrintf (" CSigningManager::%s -- already voted for id=%s and msgHash=%s. Not voting on conflicting msgHash=%s\n " , __func__,
921- id.ToString (), prevMsgHash.ToString (), msgHash.ToString ());
922- return false ;
922+ if (allowDiffMsgHashSigning) {
923+ LogPrintf (" CSigningManager::%s -- already voted for id=%s and msgHash=%s. Signing for different msgHash=%s\n " ,
924+ __func__, id.ToString (), prevMsgHash.ToString (), msgHash.ToString ());
925+ hasVoted = false ;
926+ } else {
927+ LogPrintf (" CSigningManager::%s -- already voted for id=%s and msgHash=%s. Not voting on conflicting msgHash=%s\n " ,
928+ __func__, id.ToString (), prevMsgHash.ToString (), msgHash.ToString ());
929+ return false ;
930+ }
923931 } else if (allowReSign) {
924932 LogPrint (BCLog::LLMQ, " CSigningManager::%s -- already voted for id=%s and msgHash=%s. Resigning!\n " , __func__,
925933 id.ToString (), prevMsgHash.ToString ());
0 commit comments