Skip to content

Commit 754177e

Browse files
random-zebrafurszy
authored andcommitted
[BUG][TierTwo] Clear fulfilled requests when mnsync fails
the current asset should be checked, not the "next" one. Github-Pull: #2559 Rebased-From: db36fb8
1 parent 5a2e0d1 commit 754177e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/masternode-sync.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,13 @@ int CMasternodeSync::GetNextAsset(int currentAsset)
185185

186186
void CMasternodeSync::SwitchToNextAsset()
187187
{
188+
if (RequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL ||
189+
RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED) {
190+
ClearFulfilledRequest();
191+
}
188192
const int nextAsset = GetNextAsset(RequestedMasternodeAssets);
189193
if (nextAsset == MASTERNODE_SYNC_FINISHED) {
190194
LogPrintf("%s - Sync has finished\n", __func__);
191-
} else if (nextAsset == MASTERNODE_SYNC_FAILED) {
192-
ClearFulfilledRequest();
193195
}
194196
RequestedMasternodeAssets = nextAsset;
195197
RequestedMasternodeAttempt = 0;

0 commit comments

Comments
 (0)