Skip to content

Commit

Permalink
No matter how fast we process sig shares, always force 100ms between …
Browse files Browse the repository at this point in the history
…sending
  • Loading branch information
codablock authored and panleone committed Apr 4, 2024
1 parent 148ce87 commit 4e40e25
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/llmq/quorums_signing_shares.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1108,14 +1108,20 @@ void CSigSharesManager::BanNode(NodeId nodeId)

void CSigSharesManager::WorkThreadMain()
{
int64_t lastSendTime = 0;
while (!interruptSigningShare) {
bool didWork = false;

RemoveBannedNodeStates();
didWork |= quorumSigningManager->ProcessPendingRecoveredSigs(*g_connman);
didWork |= ProcessPendingSigShares(*g_connman);
didWork |= SignPendingSigShares();
SendMessages();

if (GetTimeMillis() - lastSendTime > 100) {
SendMessages();
lastSendTime = GetTimeMillis();
}

Cleanup();
quorumSigningManager->Cleanup();

Expand Down

0 comments on commit 4e40e25

Please sign in to comment.