No POOL_STATE_ERROR or POOL_STATE_SUCCESS on masternodes (#2009)

The reason for this removal is that this block was a copy/paste when we spit one huge privatesend file into multiple classes/files trying to make as little changes as possible to not to break anything. If you look at CPrivateSendServer::SetState() you'll notice that these states (POOL_STATE_ERROR and POOL_STATE_SUCCESS) are illegal for masternodes anyway, so no reason to have conditions relying on that or trying to set illigal state.
This commit is contained in:
UdjinM6 2018-03-21 14:10:19 +03:00 committed by GitHub
parent d03adb7c39
commit d1bf615f33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -292,12 +292,6 @@ void CPrivateSendServer::CheckPool(CConnman& connman)
CommitFinalTransaction(connman); CommitFinalTransaction(connman);
return; return;
} }
// reset if we're here for 10 seconds
if((nState == POOL_STATE_ERROR || nState == POOL_STATE_SUCCESS) && GetTimeMillis() - nTimeLastSuccessfulStep >= 10000) {
LogPrint("privatesend", "CPrivateSendServer::CheckPool -- timeout, RESETTING\n");
SetNull();
}
} }
void CPrivateSendServer::CreateFinalTransaction(CConnman& connman) void CPrivateSendServer::CreateFinalTransaction(CConnman& connman)
@ -483,7 +477,6 @@ void CPrivateSendServer::CheckTimeout(CConnman& connman)
(nState == POOL_STATE_SIGNING) ? "Signing" : "Session", nTimeout); (nState == POOL_STATE_SIGNING) ? "Signing" : "Session", nTimeout);
ChargeFees(connman); ChargeFees(connman);
SetNull(); SetNull();
SetState(POOL_STATE_ERROR);
} }
} }