@@ -156,7 +156,7 @@ bool CDKGSession::Init(const uint256& _myProTxHash, int _quorumIndex)
156156 return true ;
157157}
158158
159- void CDKGSession::Contribute (CDKGPendingMessages& pendingMessages)
159+ void CDKGSession::Contribute (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
160160{
161161 CDKGLogger logger (*this , __func__, __LINE__);
162162
@@ -174,10 +174,10 @@ void CDKGSession::Contribute(CDKGPendingMessages& pendingMessages)
174174 logger.Batch (" generated contributions. time=%d" , t1.count ());
175175 logger.Flush ();
176176
177- SendContributions (pendingMessages);
177+ SendContributions (pendingMessages, peerman );
178178}
179179
180- void CDKGSession::SendContributions (CDKGPendingMessages& pendingMessages)
180+ void CDKGSession::SendContributions (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
181181{
182182 CDKGLogger logger (*this , __func__, __LINE__);
183183
@@ -226,7 +226,7 @@ void CDKGSession::SendContributions(CDKGPendingMessages& pendingMessages)
226226 return true ;
227227 });
228228
229- pendingMessages.PushPendingMessage (-1 , nullptr , qc );
229+ pendingMessages.PushPendingMessage (-1 , qc, peerman );
230230}
231231
232232// only performs cheap verifications, but not the signature of the message. this is checked with batched verification
@@ -417,7 +417,7 @@ void CDKGSession::VerifyPendingContributions()
417417 pendingContributionVerifications.clear ();
418418}
419419
420- void CDKGSession::VerifyAndComplain (CDKGPendingMessages& pendingMessages)
420+ void CDKGSession::VerifyAndComplain (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
421421{
422422 if (!AreWeMember ()) {
423423 return ;
@@ -455,7 +455,7 @@ void CDKGSession::VerifyAndComplain(CDKGPendingMessages& pendingMessages)
455455
456456 VerifyConnectionAndMinProtoVersions ();
457457
458- SendComplaint (pendingMessages);
458+ SendComplaint (pendingMessages, peerman );
459459}
460460
461461void CDKGSession::VerifyConnectionAndMinProtoVersions () const
@@ -499,7 +499,7 @@ void CDKGSession::VerifyConnectionAndMinProtoVersions() const
499499 }
500500}
501501
502- void CDKGSession::SendComplaint (CDKGPendingMessages& pendingMessages)
502+ void CDKGSession::SendComplaint (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
503503{
504504 CDKGLogger logger (*this , __func__, __LINE__);
505505
@@ -538,7 +538,7 @@ void CDKGSession::SendComplaint(CDKGPendingMessages& pendingMessages)
538538 return true ;
539539 });
540540
541- pendingMessages.PushPendingMessage (-1 , nullptr , qc );
541+ pendingMessages.PushPendingMessage (-1 , qc, peerman );
542542}
543543
544544// only performs cheap verifications, but not the signature of the message. this is checked with batched verification
@@ -645,7 +645,7 @@ std::optional<CInv> CDKGSession::ReceiveMessage(const CDKGComplaint& qc)
645645 return inv;
646646}
647647
648- void CDKGSession::VerifyAndJustify (CDKGPendingMessages& pendingMessages)
648+ void CDKGSession::VerifyAndJustify (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
649649{
650650 if (!AreWeMember ()) {
651651 return ;
@@ -682,11 +682,12 @@ void CDKGSession::VerifyAndJustify(CDKGPendingMessages& pendingMessages)
682682
683683 logger.Flush ();
684684 if (!justifyFor.empty ()) {
685- SendJustification (pendingMessages, justifyFor);
685+ SendJustification (pendingMessages, peerman, justifyFor);
686686 }
687687}
688688
689- void CDKGSession::SendJustification (CDKGPendingMessages& pendingMessages, const std::set<uint256>& forMembers)
689+ void CDKGSession::SendJustification (CDKGPendingMessages& pendingMessages, PeerManager& peerman,
690+ const std::set<uint256>& forMembers)
690691{
691692 CDKGLogger logger (*this , __func__, __LINE__);
692693
@@ -731,7 +732,7 @@ void CDKGSession::SendJustification(CDKGPendingMessages& pendingMessages, const
731732 return true ;
732733 });
733734
734- pendingMessages.PushPendingMessage (-1 , nullptr , qj );
735+ pendingMessages.PushPendingMessage (-1 , qj, peerman );
735736}
736737
737738// only performs cheap verifications, but not the signature of the message. this is checked with batched verification
@@ -885,7 +886,7 @@ std::optional<CInv> CDKGSession::ReceiveMessage(const CDKGJustification& qj)
885886 return inv;
886887}
887888
888- void CDKGSession::VerifyAndCommit (CDKGPendingMessages& pendingMessages)
889+ void CDKGSession::VerifyAndCommit (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
889890{
890891 if (!AreWeMember ()) {
891892 return ;
@@ -927,10 +928,10 @@ void CDKGSession::VerifyAndCommit(CDKGPendingMessages& pendingMessages)
927928
928929 logger.Flush ();
929930
930- SendCommitment (pendingMessages);
931+ SendCommitment (pendingMessages, peerman );
931932}
932933
933- void CDKGSession::SendCommitment (CDKGPendingMessages& pendingMessages)
934+ void CDKGSession::SendCommitment (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
934935{
935936 CDKGLogger logger (*this , __func__, __LINE__);
936937
@@ -1041,7 +1042,7 @@ void CDKGSession::SendCommitment(CDKGPendingMessages& pendingMessages)
10411042 return true ;
10421043 });
10431044
1044- pendingMessages.PushPendingMessage (-1 , nullptr , qc );
1045+ pendingMessages.PushPendingMessage (-1 , qc, peerman );
10451046}
10461047
10471048// only performs cheap verifications, but not the signature of the message. this is checked with batched verification
0 commit comments