refactor: drop unneccessary if guard

This commit is contained in:
pasta 2024-12-18 12:51:11 -06:00
parent dd96032e12
commit d7e30765cc
No known key found for this signature in database
GPG Key ID: 5255B86F912A614A

View File

@ -739,16 +739,14 @@ void CSigSharesManager::ProcessSigShare(PeerManager& peerman, const CSigShare& s
// Update the time we've seen the last sigShare // Update the time we've seen the last sigShare
timeSeenForSessions[sigShare.GetSignHash()] = GetTime<std::chrono::seconds>().count(); timeSeenForSessions[sigShare.GetSignHash()] = GetTime<std::chrono::seconds>().count();
if (!quorumNodes.empty()) { // don't announce and wait for other nodes to request this share and directly send it to them
// don't announce and wait for other nodes to request this share and directly send it to them // there is no way the other nodes know about this share as this is the one created on this node
// there is no way the other nodes know about this share as this is the one created on this node for (auto otherNodeId : quorumNodes) {
for (auto otherNodeId : quorumNodes) { auto& nodeState = nodeStates[otherNodeId];
auto& nodeState = nodeStates[otherNodeId]; auto& session = nodeState.GetOrCreateSessionFromShare(sigShare);
auto& session = nodeState.GetOrCreateSessionFromShare(sigShare); session.quorum = quorum;
session.quorum = quorum; session.requested.Set(sigShare.getQuorumMember(), true);
session.requested.Set(sigShare.getQuorumMember(), true); session.knows.Set(sigShare.getQuorumMember(), true);
session.knows.Set(sigShare.getQuorumMember(), true);
}
} }
size_t sigShareCount = sigShares.CountForSignHash(sigShare.GetSignHash()); size_t sigShareCount = sigShares.CountForSignHash(sigShare.GetSignHash());