Move spork21 condition into VerifyConnectionAndMinProtoVersions

This commit is contained in:
Alexander Block 2020-03-31 07:11:27 +02:00
parent a3c1fce551
commit 88d4f551c9

View File

@ -438,15 +438,17 @@ void CDKGSession::VerifyAndComplain(CDKGPendingMessages& pendingMessages)
logger.Batch("verified contributions. time=%d", t1.count()); logger.Batch("verified contributions. time=%d", t1.count());
logger.Flush(); logger.Flush();
if (sporkManager.IsSporkActive(SPORK_21_QUORUM_ALL_CONNECTED)) {
VerifyConnectionAndMinProtoVersions(); VerifyConnectionAndMinProtoVersions();
}
SendComplaint(pendingMessages); SendComplaint(pendingMessages);
} }
void CDKGSession::VerifyConnectionAndMinProtoVersions() void CDKGSession::VerifyConnectionAndMinProtoVersions()
{ {
if (!sporkManager.IsSporkActive(SPORK_21_QUORUM_ALL_CONNECTED)) {
return;
}
CDKGLogger logger(*this, __func__); CDKGLogger logger(*this, __func__);
std::unordered_map<uint256, int, StaticSaltedHasher> protoMap; std::unordered_map<uint256, int, StaticSaltedHasher> protoMap;