-
Notifications
You must be signed in to change notification settings - Fork 41
fix Deprecated packages and swarm peers convert error #21
Conversation
godcong
commented
Jul 18, 2019
- changed Deprecated packages to new packages
- fix swarm peers Latency convert error
- fixswarm peers address parse error
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.
Thanks
response.go
Outdated
if e != nil { | ||
return e | ||
} | ||
fmt.Println(string(b)) |
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.
Probably didn't mean to check this patch in.
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.
i reverted it.
i'm sorry to patched it.
that's only my debug source.
swarm.go
Outdated
@@ -98,7 +98,8 @@ func (api *SwarmAPI) Peers(ctx context.Context) ([]iface.ConnectionInfo, error) | |||
|
|||
out.addr, err = multiaddr.NewMultiaddr(conn.Addr) | |||
if err != nil { | |||
return nil, err | |||
//ignore error for get some address like this:ip4/94.130.135.167/tcp/4002/ws/ipfs/QmUEMvxS2e7iDrereVYc5SWPauXPyNwxcy9BXZrC1QTcHE |
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.
We probably don't want to ignore this peer. Let's just not set the addr and document this. Relates to multiformats/multiaddr#70.
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, This is better.