bitcoin/bitcoin — pull request #673 by mndrix (2011-12-02 00:36:59+00:00)
Title: Store fewer time samples

Storing fewer time samples makes a node's time offset more accurate following system clock adjustments, uses less memory and avoids a possible memory exhaustion attack.

The only part of this patch I'm not entirely pleased with is the choice of 200 as the limit. In my tests, that's roughly two hours of network activity. I chose two hours because it seemed about right, but have no rational basis for the decision.