From fab27b03579635faea047dd5606abbf7418f7aca Mon Sep 17 00:00:00 2001 From: NIC619 Date: Tue, 26 Nov 2019 12:35:50 +0800 Subject: [PATCH] Fix lint --- libp2p/peer/peerstore.py | 4 ++-- libp2p/peer/peerstore_interface.py | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/libp2p/peer/peerstore.py b/libp2p/peer/peerstore.py index 8111f08..03edffb 100644 --- a/libp2p/peer/peerstore.py +++ b/libp2p/peer/peerstore.py @@ -203,8 +203,8 @@ class PeerStore(IPeerStore): :param peer_id: peer ID to add private key for :param key_pair: """ - self.add_pubkey(key_pair.public_key) - self.add_privkey(key_pair.private_key) + self.add_pubkey(peer_id, key_pair.public_key) + self.add_privkey(peer_id, key_pair.private_key) class PeerStoreError(KeyError): diff --git a/libp2p/peer/peerstore_interface.py b/libp2p/peer/peerstore_interface.py index 618bbf5..a9790b0 100644 --- a/libp2p/peer/peerstore_interface.py +++ b/libp2p/peer/peerstore_interface.py @@ -1,5 +1,5 @@ from abc import abstractmethod -from typing import Any, List, Sequence, Set +from typing import Any, List, Sequence from multiaddr import Multiaddr @@ -138,9 +138,3 @@ class IPeerStore(IAddrBook, IPeerMetadata): :param key_pair: :raise PeerStoreError: if peer ID already has pubkey or privkey set """ - - @abstractmethod - def peers_with_keys(self) -> Set[ID]: - """ - :return: all of the peer IDs which has pubkey/privkey stored in peer store - """