Fix a crash in masternode winners when count is too large (#2902)

This commit is contained in:
UdjinM6 2019-05-06 17:58:59 +03:00 committed by GitHub
parent 357b7279de
commit b63f7dd39a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,6 +261,10 @@ std::map<int, std::string> GetRequiredPaymentsStrings(int nStartHeight, int nEnd
{
std::map<int, std::string> mapPayments;
if (nStartHeight < 1) {
nStartHeight = 1;
}
LOCK(cs_main);
int nChainTipHeight = chainActive.Height();