From 9ae3eaaeb014621f98b0ba48e7c5a13e587c2f1f Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 8 Apr 2019 18:11:34 +1000 Subject: [PATCH] Add to comment on KeyBook.PrivKey (#64) --- interface.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface.go b/interface.go index 4d16668..bdf8839 100644 --- a/interface.go +++ b/interface.go @@ -125,14 +125,15 @@ type AddrBook interface { // KeyBook tracks the keys of Peers. type KeyBook interface { - // PubKey stores the public key of a peer. PubKey(peer.ID) ic.PubKey // AddPubKey stores the public key of a peer. AddPubKey(peer.ID, ic.PubKey) error - // PrivKey returns the private key of a peer. + // PrivKey returns the private key of a peer, if known. Generally this might only be our own + // private key, see + // https://discuss.libp2p.io/t/what-is-the-purpose-of-having-map-peer-id-privatekey-in-peerstore/74. PrivKey(peer.ID) ic.PrivKey // AddPrivKey stores the private key of a peer.