mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-31 14:00:06 +08:00
regroup test utils; remove unused function.
This commit is contained in:
parent
027d289a66
commit
08de02b668
@ -1,22 +0,0 @@
|
|||||||
package test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/libp2p/go-libp2p-peer"
|
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
|
||||||
)
|
|
||||||
|
|
||||||
func peerId(ids string) peer.ID {
|
|
||||||
id, err := peer.IDB58Decode(ids)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return id
|
|
||||||
}
|
|
||||||
|
|
||||||
func multiaddr(m string) ma.Multiaddr {
|
|
||||||
maddr, err := ma.NewMultiaddr(m)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return maddr
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user