Fix negative height issues for pruning cheat lists

This commit is contained in:
miketout
2018-10-11 14:23:14 -07:00
parent 16ef4f1e3d
commit 1021455845
8 changed files with 28 additions and 22 deletions

View File

@@ -5005,7 +5005,8 @@ bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNo
// when we succeed here, we prune all cheat candidates in the cheat list to 250 blocks ago, as they should be used or not
// useful by then
cheatList.Prune(height - 250);
if ((height - 250) > 1)
cheatList.Prune(height - 250);
return true;
}