Commit Graph

8 Commits

Author SHA1 Message Date
Cole Brown
d50ea9bc1f Ensure all tests pass without weak RSA key flag 2019-08-28 11:34:22 -04:00
Alex Stokes
686c1736fd
Compare multihash Code to IDENTITY when extracting public key
This PR is a non-substantive change with the goal of making this method
`ExtractPublicKey` from a `peer.ID` clearer to the reader. This goal is
accomplished by using the full name of the identity hash code `IDENTITY` instead
of the deprecated `ID` code. This change makes its clearer to the reader that
there is a trivial way to compute the public key given the digest. Without this
change it is easy to confuse `ID` with a concept relating to peer IDs (and thus
implying this function somehow computes a hash pre-image to get the
corrresponding public key.
2019-08-14 14:27:04 -07:00
Steven Allen
c2a62a74af feat(peer): implement AddrInfosFromP2pAddrs and SplitAddr
* SplitAddr is a simpler way to split an address into a multiaddr and an ID.
* AddrInfosFromP2pAddrs converts a set of multiaddrs into a set of AddrInfos.
2019-05-31 12:25:57 -07:00
Steven Allen
ecce2522bf fix: handle empty addrs case 2019-05-30 22:25:37 -07:00
Steven Allen
5ea5a0797b chore: cleanup address parsing
* Use SplitLast to avoid allocating too much.
* Avoid converting to/from strings when working with multiaddrs.
2019-05-30 21:57:09 -07:00
Raúl Kripalani
79bf30a5a4 fix duplicated import. 2019-05-23 16:14:50 +01:00
Raúl Kripalani
07fbce0b46
absorb {crypto,peer} test utils. (#8)
Avoids circular module dependency.
2019-05-23 16:07:58 +01:00
Raúl Kripalani
6e566d10f4
Absorb go-libp2p abstractions and core types into this module (#1) 2019-05-22 18:31:11 +01:00