1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-18 22:10:09 +08:00

style(core) peer -> self

This commit is contained in:
Brian Tiger Chow
2014-11-11 15:19:57 -08:00
parent 027de2847a
commit 1ed0850ce2

View File

@ -207,7 +207,7 @@ func initIdentity(cfg *config.Config, peers peer.Peerstore, online bool) (peer.P
// get peer from peerstore (so it is constructed there) // get peer from peerstore (so it is constructed there)
id := peer.ID(b58.Decode(cfg.Identity.PeerID)) id := peer.ID(b58.Decode(cfg.Identity.PeerID))
peer, err := peers.Get(id) self, err := peers.Get(id)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -219,12 +219,12 @@ func initIdentity(cfg *config.Config, peers peer.Peerstore, online bool) (peer.P
return nil, err return nil, err
} }
if err := peer.LoadAndVerifyKeyPair(skb); err != nil { if err := self.LoadAndVerifyKeyPair(skb); err != nil {
return nil, err return nil, err
} }
} }
return peer, nil return self, nil
} }
func initConnections(ctx context.Context, cfg *config.Config, pstore peer.Peerstore, route *dht.IpfsDHT) { func initConnections(ctx context.Context, cfg *config.Config, pstore peer.Peerstore, route *dht.IpfsDHT) {