@@ -156,7 +156,7 @@ bool CDKGSession::Init(const uint256& _myProTxHash, int _quorumIndex)
156
156
return true ;
157
157
}
158
158
159
- void CDKGSession::Contribute (CDKGPendingMessages& pendingMessages)
159
+ void CDKGSession::Contribute (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
160
160
{
161
161
CDKGLogger logger (*this , __func__, __LINE__);
162
162
@@ -174,10 +174,10 @@ void CDKGSession::Contribute(CDKGPendingMessages& pendingMessages)
174
174
logger.Batch (" generated contributions. time=%d" , t1.count ());
175
175
logger.Flush ();
176
176
177
- SendContributions (pendingMessages);
177
+ SendContributions (pendingMessages, peerman );
178
178
}
179
179
180
- void CDKGSession::SendContributions (CDKGPendingMessages& pendingMessages)
180
+ void CDKGSession::SendContributions (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
181
181
{
182
182
CDKGLogger logger (*this , __func__, __LINE__);
183
183
@@ -226,7 +226,7 @@ void CDKGSession::SendContributions(CDKGPendingMessages& pendingMessages)
226
226
return true ;
227
227
});
228
228
229
- pendingMessages.PushPendingMessage (-1 , nullptr , qc );
229
+ pendingMessages.PushPendingMessage (-1 , qc, peerman );
230
230
}
231
231
232
232
// only performs cheap verifications, but not the signature of the message. this is checked with batched verification
@@ -417,7 +417,7 @@ void CDKGSession::VerifyPendingContributions()
417
417
pendingContributionVerifications.clear ();
418
418
}
419
419
420
- void CDKGSession::VerifyAndComplain (CDKGPendingMessages& pendingMessages)
420
+ void CDKGSession::VerifyAndComplain (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
421
421
{
422
422
if (!AreWeMember ()) {
423
423
return ;
@@ -455,7 +455,7 @@ void CDKGSession::VerifyAndComplain(CDKGPendingMessages& pendingMessages)
455
455
456
456
VerifyConnectionAndMinProtoVersions ();
457
457
458
- SendComplaint (pendingMessages);
458
+ SendComplaint (pendingMessages, peerman );
459
459
}
460
460
461
461
void CDKGSession::VerifyConnectionAndMinProtoVersions () const
@@ -499,7 +499,7 @@ void CDKGSession::VerifyConnectionAndMinProtoVersions() const
499
499
}
500
500
}
501
501
502
- void CDKGSession::SendComplaint (CDKGPendingMessages& pendingMessages)
502
+ void CDKGSession::SendComplaint (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
503
503
{
504
504
CDKGLogger logger (*this , __func__, __LINE__);
505
505
@@ -538,7 +538,7 @@ void CDKGSession::SendComplaint(CDKGPendingMessages& pendingMessages)
538
538
return true ;
539
539
});
540
540
541
- pendingMessages.PushPendingMessage (-1 , nullptr , qc );
541
+ pendingMessages.PushPendingMessage (-1 , qc, peerman );
542
542
}
543
543
544
544
// 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)
645
645
return inv;
646
646
}
647
647
648
- void CDKGSession::VerifyAndJustify (CDKGPendingMessages& pendingMessages)
648
+ void CDKGSession::VerifyAndJustify (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
649
649
{
650
650
if (!AreWeMember ()) {
651
651
return ;
@@ -682,11 +682,12 @@ void CDKGSession::VerifyAndJustify(CDKGPendingMessages& pendingMessages)
682
682
683
683
logger.Flush ();
684
684
if (!justifyFor.empty ()) {
685
- SendJustification (pendingMessages, justifyFor);
685
+ SendJustification (pendingMessages, peerman, justifyFor);
686
686
}
687
687
}
688
688
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)
690
691
{
691
692
CDKGLogger logger (*this , __func__, __LINE__);
692
693
@@ -731,7 +732,7 @@ void CDKGSession::SendJustification(CDKGPendingMessages& pendingMessages, const
731
732
return true ;
732
733
});
733
734
734
- pendingMessages.PushPendingMessage (-1 , nullptr , qj );
735
+ pendingMessages.PushPendingMessage (-1 , qj, peerman );
735
736
}
736
737
737
738
// 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)
885
886
return inv;
886
887
}
887
888
888
- void CDKGSession::VerifyAndCommit (CDKGPendingMessages& pendingMessages)
889
+ void CDKGSession::VerifyAndCommit (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
889
890
{
890
891
if (!AreWeMember ()) {
891
892
return ;
@@ -927,10 +928,10 @@ void CDKGSession::VerifyAndCommit(CDKGPendingMessages& pendingMessages)
927
928
928
929
logger.Flush ();
929
930
930
- SendCommitment (pendingMessages);
931
+ SendCommitment (pendingMessages, peerman );
931
932
}
932
933
933
- void CDKGSession::SendCommitment (CDKGPendingMessages& pendingMessages)
934
+ void CDKGSession::SendCommitment (CDKGPendingMessages& pendingMessages, PeerManager& peerman )
934
935
{
935
936
CDKGLogger logger (*this , __func__, __LINE__);
936
937
@@ -1041,7 +1042,7 @@ void CDKGSession::SendCommitment(CDKGPendingMessages& pendingMessages)
1041
1042
return true ;
1042
1043
});
1043
1044
1044
- pendingMessages.PushPendingMessage (-1 , nullptr , qc );
1045
+ pendingMessages.PushPendingMessage (-1 , qc, peerman );
1045
1046
}
1046
1047
1047
1048
// only performs cheap verifications, but not the signature of the message. this is checked with batched verification
0 commit comments