1credit/1credit — pull request #1 by drainx (2014-10-12 04:55:20+00:00)
Title: Fix the KGW diff call to not vary as widely, and take a larger sample si...

...ze than just a single block.

Because PastBlocksMin always equated to 1, the sample was at a minimum of 1, which would cause a large spread on the difficulty depending on how close/far the last block was to the target time. This can be seen from the initial KGW implementation present in the parent commit. 1 sample is not enough to determine.

This commit has only been lightly tested and not done on a local chain fork for actual application testing.