blocksync tagging

This commit is contained in:
whyrusleeping
2019-12-16 22:15:06 -08:00
parent eb4077b1af
commit 28b470cb0d
3 changed files with 18 additions and 5 deletions
+5 -3
View File
@@ -69,13 +69,15 @@ func ConnectionManager(low, high int, grace time.Duration, protected []string) f
for _, p := range protected {
pid, err := peer.IDFromString(p)
if err != nil {
return nil, xerrors.Errorf("failed to parse peer ID in protected peers array: %w", err)
return Libp2pOpts{}, xerrors.Errorf("failed to parse peer ID in protected peers array: %w", err)
}
cm.Protect(pid, "config-prot")
}
opts.Opts = append(opts.Opts, libp2p.ConnectionManager(cm))
return
return Libp2pOpts{
Opts: []libp2p.Option{libp2p.ConnectionManager(cm)},
}, nil
}
}