Skip to content

Commit

Permalink
Tiertwo: do not block peers if they requested a single proposal or si…
Browse files Browse the repository at this point in the history
…ngle budget finalization.

Neither block them if it's us who started the budget sync process.

Co-authored-by: random-zebra <random.zebra@protonmail.com>
  • Loading branch information
furszy and random-zebra committed Dec 10, 2021
1 parent ae28000 commit 5f596b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/budget/budgetmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ void CBudgetManager::Sync(CNode* pfrom, const uint256& nProp, bool fPartial)
g_connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::SYNCSTATUSCOUNT, MASTERNODE_SYNC_BUDGET_FIN, nInvCount));
LogPrint(BCLog::MNBUDGET, "%s: sent %d items\n", __func__, nInvCount);

{
if (!fPartial && nProp.IsNull()) { // Only for external full budget sync requests
// Now that budget full sync request was handled, mark it as completed.
// We are not going to answer full budget sync requests for an hour (BUDGET_SYNC_REQUEST_ACCEPTANCE_SECONDS).
// The remote peer can still do single prop and mnv sync requests if needed.
Expand Down

0 comments on commit 5f596b8

Please sign in to comment.