@@ -479,7 +479,7 @@ void CSigSharesManager::ProcessMessageSigShare(NodeId fromId, const CSigShare& s
479479 if (!quorum) {
480480 return ;
481481 }
482- if (!llmq::utils::IsQuorumActive ((Consensus::LLMQType)sigShare.llmqType , quorum->pindexQuorum -> GetBlockHash () )) {
482+ if (!llmq::utils::IsQuorumActive ((Consensus::LLMQType)sigShare.llmqType , quorum->qc . quorumHash )) {
483483 // quorum is too old
484484 return ;
485485 }
@@ -490,7 +490,7 @@ void CSigSharesManager::ProcessMessageSigShare(NodeId fromId, const CSigShare& s
490490 if (quorum->quorumVvec == nullptr ) {
491491 // TODO we should allow to ask other nodes for the quorum vvec if we missed it in the DKG
492492 LogPrint (BCLog::LLMQ, " CSigSharesManager::%s -- we don't have the quorum vvec for %s, no verification possible. node=%d\n " , __func__,
493- quorum->pindexQuorum -> GetBlockHash () .ToString (), fromId);
493+ quorum->qc . quorumHash .ToString (), fromId);
494494 return ;
495495 }
496496
@@ -499,11 +499,11 @@ void CSigSharesManager::ProcessMessageSigShare(NodeId fromId, const CSigShare& s
499499 BanNode (fromId);
500500 return ;
501501 }
502- // if (!quorum->qc.validMembers[sigShare.quorumMember]) {
503- // LogPrint(BCLog::LLMQ, "CSigSharesManager::%s -- quorumMember not valid\n", __func__);
504- // BanNode(fromId);
505- // return;
506- // }
502+ if (!quorum->qc .validMembers [sigShare.quorumMember ]) {
503+ LogPrint (BCLog::LLMQ, " CSigSharesManager::%s -- quorumMember not valid\n " , __func__);
504+ BanNode (fromId);
505+ return ;
506+ }
507507
508508 {
509509 LOCK (cs);
@@ -528,7 +528,7 @@ bool CSigSharesManager::PreVerifyBatchedSigShares(NodeId nodeId, const CSigShare
528528{
529529 retBan = false ;
530530
531- if (!llmq::utils::IsQuorumActive (session.llmqType , session.quorum ->pindexQuorum -> GetBlockHash () )) {
531+ if (!llmq::utils::IsQuorumActive (session.llmqType , session.quorum ->qc . quorumHash )) {
532532 // quorum is too old
533533 return false ;
534534 }
@@ -557,7 +557,7 @@ bool CSigSharesManager::PreVerifyBatchedSigShares(NodeId nodeId, const CSigShare
557557 retBan = true ;
558558 return false ;
559559 }
560- if (!session.quorum ->validMembers [quorumMember]) {
560+ if (!session.quorum ->qc . validMembers [quorumMember]) {
561561 LogPrintf (" CSigSharesManager::%s -- quorumMember not valid\n " , __func__);
562562 retBan = true ;
563563 return false ;
@@ -778,7 +778,7 @@ void CSigSharesManager::TryRecoverSig(const CQuorumCPtr& quorum, const uint256&
778778
779779 auto k = std::make_pair (quorum->params .type , id);
780780
781- auto signHash = llmq::utils::BuildSignHash (quorum->params .type , quorum->pindexQuorum -> GetBlockHash () , id, msgHash);
781+ auto signHash = llmq::utils::BuildSignHash (quorum->params .type , quorum->qc . quorumHash , id, msgHash);
782782 auto sigShares = this ->sigShares .GetAllForSignHash (signHash);
783783 if (!sigShares) {
784784 return ;
@@ -812,7 +812,7 @@ void CSigSharesManager::TryRecoverSig(const CQuorumCPtr& quorum, const uint256&
812812
813813 CRecoveredSig rs;
814814 rs.llmqType = quorum->params .type ;
815- rs.quorumHash = quorum->pindexQuorum -> GetBlockHash () ;
815+ rs.quorumHash = quorum->qc . quorumHash ;
816816 rs.id = id;
817817 rs.msgHash = msgHash;
818818 rs.sig .Set (recoveredSig);
@@ -823,7 +823,7 @@ void CSigSharesManager::TryRecoverSig(const CQuorumCPtr& quorum, const uint256&
823823 // verification because this is unbatched and thus slow verification that happens here.
824824 if (((recoveredSigsCounter++) % 100 ) == 0 ) {
825825 auto signHash = llmq::utils::BuildSignHash (rs);
826- bool valid = recoveredSig.VerifyInsecure (quorum->quorumPublicKey , signHash);
826+ bool valid = recoveredSig.VerifyInsecure (quorum->qc . quorumPublicKey , signHash);
827827 if (!valid) {
828828 // this should really not happen as we have verified all signature shares before
829829 LogPrintf (" CSigSharesManager::%s -- own recovered signature is invalid. id=%s, msgHash=%s\n " , __func__,
@@ -1521,7 +1521,7 @@ void CSigSharesManager::Sign(const CQuorumCPtr& quorum, const uint256& id, const
15211521
15221522 CBLSSecretKey skShare = quorum->GetSkShare ();
15231523 if (!skShare.IsValid ()) {
1524- LogPrint (BCLog::LLMQ, " CSigSharesManager::%s -- we don't have our skShare for quorum %s\n " , __func__, quorum->pindexQuorum -> GetBlockHash () .ToString ());
1524+ LogPrint (BCLog::LLMQ, " CSigSharesManager::%s -- we don't have our skShare for quorum %s\n " , __func__, quorum->qc . quorumHash .ToString ());
15251525 return ;
15261526 }
15271527
@@ -1533,7 +1533,7 @@ void CSigSharesManager::Sign(const CQuorumCPtr& quorum, const uint256& id, const
15331533
15341534 CSigShare sigShare;
15351535 sigShare.llmqType = quorum->params .type ;
1536- sigShare.quorumHash = quorum->pindexQuorum -> GetBlockHash () ;
1536+ sigShare.quorumHash = quorum->qc . quorumHash ;
15371537 sigShare.id = id;
15381538 sigShare.msgHash = msgHash;
15391539 sigShare.quorumMember = (uint16_t )memberIdx;
@@ -1549,7 +1549,7 @@ void CSigSharesManager::Sign(const CQuorumCPtr& quorum, const uint256& id, const
15491549 sigShare.UpdateKey ();
15501550
15511551 LogPrint (BCLog::LLMQ, " CSigSharesManager::%s -- signed sigShare. signHash=%s, id=%s, msgHash=%s, llmqType=%d, quorum=%s, time=%s\n " , __func__,
1552- signHash.ToString (), sigShare.id .ToString (), sigShare.msgHash .ToString (), quorum->params .type , quorum->pindexQuorum -> GetBlockHash () .ToString (), t.count ());
1552+ signHash.ToString (), sigShare.id .ToString (), sigShare.msgHash .ToString (), quorum->params .type , quorum->qc . quorumHash .ToString (), t.count ());
15531553 ProcessSigShare (-1 , sigShare, *g_connman, quorum);
15541554
15551555 LOCK (cs);
@@ -1564,7 +1564,7 @@ void CSigSharesManager::Sign(const CQuorumCPtr& quorum, const uint256& id, const
15641564void CSigSharesManager::ForceReAnnouncement (const CQuorumCPtr& quorum, Consensus::LLMQType llmqType, const uint256& id, const uint256& msgHash)
15651565{
15661566 LOCK (cs);
1567- auto signHash = llmq::utils::BuildSignHash (llmqType, quorum->pindexQuorum -> GetBlockHash () , id, msgHash);
1567+ auto signHash = llmq::utils::BuildSignHash (llmqType, quorum->qc . quorumHash , id, msgHash);
15681568 auto sigs = sigShares.GetAllForSignHash (signHash);
15691569 if (sigs) {
15701570 for (auto & p : *sigs) {
0 commit comments