bitpay/bitcore — pull request #271 by gordonwritescode (2014-04-19 15:41:16+00:00)
Title: WIP: Peer Discovery

Working on automatic peer discovery from within the `PeerManager` class. I have this working successfully, but it likely needs some tweaking. Would like to get everyone's feedback on how this is implemented.

Here is what I've done:

* added the `defaultClientPort` and `dnsSeeds` (from bitcoin core) to *networks.js*
* added `discoverPeers()` method to `PeerManager` that resolves all DNS seeds in parallel and passes results to a callback (also caching the results)
* added a working example to the examples directory - set `config.logger` to "debug" - it's f'ing beautiful

Todo:

* add tests