@@ -1029,7 +1029,7 @@ void CSigSharesManager::CollectSigSharesToSendConcentrated(std::unordered_map<No
10291029 proTxToNode.try_emplace (verifiedProRegTxHash, pnode);
10301030 }
10311031
1032- auto curTime = std::chrono::steady_clock ::now ();
1032+ auto curTime = NodeClock ::now ();
10331033
10341034 for (auto & [_, signedSession] : signedSessions) {
10351035 if (!IsAllMembersConnectedEnabled (signedSession.quorum ->params .type , m_sporkman)) {
@@ -1527,14 +1527,9 @@ void CSigSharesManager::WorkThreadMain(CConnman& connman, PeerManager& peerman)
15271527 }
15281528 }
15291529 {
1530- // Consider next recovery attempt times for signed sessions to avoid polling
15311530 LOCK (cs);
1532- auto now_steady = std::chrono::steady_clock::now ();
1533- for (const auto & [_, s] : signedSessions) {
1534- if (s.nextAttemptTime > now_steady) {
1535- if (s.nextAttemptTime < next_deadline) next_deadline = s.nextAttemptTime ;
1536- }
1537- }
1531+ next_deadline = std::chrono::steady_clock::now () +
1532+ (signedSessions.empty () ? std::chrono::seconds (5 ) : std::chrono::milliseconds (100 ));
15381533 }
15391534
15401535 // Wait event-driven until notified or deadline reached, or interrupted
@@ -1577,7 +1572,7 @@ void CSigSharesManager::SignPendingSigShares(const CConnman& connman, PeerManage
15771572 auto & session = signedSessions[sigShare.GetSignHash ()];
15781573 session.sigShare = sigShare;
15791574 session.quorum = pQuorum;
1580- session.nextAttemptTime = std::chrono::steady_clock ::time_point{};
1575+ session.nextAttemptTime = NodeClock ::time_point{};
15811576 session.attempt = 0 ;
15821577 }
15831578 }
0 commit comments