jbenet/go-ipfs — pull request #476 by jbenet (2014-12-28 07:02:13+00:00)
Title: epictest race fix

epictest: fix mn.Peers() setup race

@maybebtc the error was not inside mocknet. the error is in
assuming the peers / nets returned follow the same order.
See:
- https://github.com/jbenet/go-ipfs/blob/master/epictest/addcat_test.go#L100
- https://gist.github.com/jbenet/a39bb9d2f16532a03bb8

if you want the results to be sorted by peer.ID before they
are returned, we can totally do that, but that's probably an
unsafe assumption to make in general-- if you do your
initialization async, the number of networks or peers may have
changed between the two calls. LMK what you prefer.

(thank you golang map chaosmonkey ;)