Commit Graph

4 Commits

Author SHA1 Message Date
Marten Seemann
6cef973b92
remove deprecated functions in the peer package (#205) 2021-07-22 12:17:36 -07:00
Marten Seemann
ea8b36912f
fix staticcheck errors (#191)
* run go mod tidy

* omit receiver name if unused

* remove unused type testkey in tests

* fix duplicate import of go-multiaddr

* fix use of deprecated peer.IDB58{Encode,Decode}

* use bytes.Equal instead of bytes.Compare

* fix unnecessary assigments to blank identifier

* use time.Until instead of t.Sub(time.Now())

* fix use of deprecated go-multihash.ID

* add missing error check in envelope test

* fix error check in tests
2021-03-30 16:13:36 -07:00
Steven Allen
adcd724744
refactor: use a helper type to decode AddrInfo from JSON (#178)
This saves us a bunch of error prone manual decode/encode logic.

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2021-02-16 12:06:38 -08: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