Anton Kaliaev f05c2a9558
p2p: extract ID validation into a separate func (#3754)
* p2p: extract ID validation into a separate func

- NewNetAddress panics if ID is invalid
- NetAddress#Valid returns an error
- remove ErrAddrBookInvalidAddrNoID

Fixes #2722

* p2p: remove repetitive check in ReceiveAddrs

* fix netaddress test
2019-07-10 13:36:48 +04:00
..
2019-01-22 13:23:18 -05:00
2019-04-03 11:22:52 +02:00
2018-07-01 22:36:49 -04:00
2018-07-01 22:36:49 -04:00
2019-04-01 19:59:57 -04:00
2019-01-11 17:41:02 -05:00
2019-06-17 13:30:12 +02:00
2019-01-28 16:13:17 +04:00

p2p

The p2p package provides an abstraction around peer-to-peer communication.

Docs:

  • Connection for details on how connections and multiplexing work
  • Peer for details on peer ID, handshakes, and peer exchange
  • Node for details about different types of nodes and how they should work
  • Pex for details on peer discovery and exchange
  • Config for details on some config option