-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update libp2p to v0.32.2 #41
Conversation
p2p.go
Outdated
} | ||
|
||
if !cfg.SecureIO { | ||
opts = append(opts, libp2p.NoSecurity) | ||
} else { | ||
opts = append(opts, libp2p.Security(secio.ID, secio.New)) | ||
// opts = append(opts, libp2p.Security(secio.ID, secio.New)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
secio is already deprecated:
secio is not maintained any more, and we advise against using it.
Use go-libp2p-tls and go-libp2p-noise instead.
and tls and noise is the two default security of libp2p, so we can just remove it
@@ -634,7 +642,7 @@ func (h *Host) AddBootstrap(bootNodeAddrs []multiaddr.Multiaddr) error { | |||
} | |||
|
|||
// HostIdentity returns the host identity string | |||
func (h *Host) HostIdentity() string { return h.host.ID().Pretty() } | |||
func (h *Host) HostIdentity() string { return h.host.ID().String() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirm Pretty()
is renamed to String()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, they are all base58-encoded
} | ||
|
||
// relay option | ||
if cfg.Relay == "active" { | ||
opts = append(opts, libp2p.EnableRelay(relay.OptActive, relay.OptHop)) | ||
opts = append(opts, libp2p.EnableRelay()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you confirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no options any more in the new version.
No description provided.