Merge pull request #7362 from filecoin-project/chore/update-libp2p
Update go-libp2p to v0.15.0
This commit is contained in:
@@ -11,19 +11,6 @@ import (
|
||||
mamask "github.com/whyrusleeping/multiaddr-filter"
|
||||
)
|
||||
|
||||
func AddrFilters(filters []string) func() (opts Libp2pOpts, err error) {
|
||||
return func() (opts Libp2pOpts, err error) {
|
||||
for _, s := range filters {
|
||||
f, err := mamask.NewMask(s)
|
||||
if err != nil {
|
||||
return opts, fmt.Errorf("incorrectly formatted address filter in config: %s", s)
|
||||
}
|
||||
opts.Opts = append(opts.Opts, libp2p.FilterAddresses(f)) //nolint:staticcheck
|
||||
}
|
||||
return opts, nil
|
||||
}
|
||||
}
|
||||
|
||||
func makeAddrsFactory(announce []string, noAnnounce []string) (p2pbhost.AddrsFactory, error) {
|
||||
var annAddrs []ma.Multiaddr
|
||||
for _, addr := range announce {
|
||||
|
||||
@@ -42,7 +42,7 @@ func PrivKey(ks types.KeyStore) (crypto.PrivKey, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
kbytes, err := pk.Bytes()
|
||||
kbytes, err := crypto.MarshalPrivateKey(pk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user