mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-28 00:39:31 +08:00
peer.Key
This commit is contained in:
@ -16,6 +16,10 @@ type Peer struct {
|
||||
Addresses []*ma.Multiaddr
|
||||
}
|
||||
|
||||
func (p *Peer) Key() u.Key {
|
||||
return u.Key(p.Id)
|
||||
}
|
||||
|
||||
func (p *Peer) AddAddress(a *ma.Multiaddr) {
|
||||
p.Addresses = append(p.Addresses, a)
|
||||
}
|
||||
|
Reference in New Issue
Block a user