motocoin-dev/motocoin — pull request #9 by HunterMinerCrafter (2014-06-22 12:35:31+00:00)
Title: Fix GetNextWorkRequired (part 1)

Better calculates median.
Also avoids an unlikely case that could have hypothetically stalled the chain in extreme circumstances.