naivecoin icon indicating copy to clipboard operation
naivecoin copied to clipboard

fix issue during mining

Open zoeleesss opened this issue 6 years ago • 0 comments

The bug was caused when timeTaken > timeExpected * 2 at first round. Originally, It would be -1, which is absolutely wrong. So in order to avoid this bug, test if prevAdjustmentBlock.difficulty > 0. if yes, then return prevAdjustmentBlock.difficulty - 1; if not , then return prevAdjustmentBlock.difficulty;

zoeleesss avatar Mar 17 '18 07:03 zoeleesss