mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Fix lint
This commit is contained in:
@ -203,8 +203,8 @@ class PeerStore(IPeerStore):
|
|||||||
:param peer_id: peer ID to add private key for
|
:param peer_id: peer ID to add private key for
|
||||||
:param key_pair:
|
:param key_pair:
|
||||||
"""
|
"""
|
||||||
self.add_pubkey(key_pair.public_key)
|
self.add_pubkey(peer_id, key_pair.public_key)
|
||||||
self.add_privkey(key_pair.private_key)
|
self.add_privkey(peer_id, key_pair.private_key)
|
||||||
|
|
||||||
|
|
||||||
class PeerStoreError(KeyError):
|
class PeerStoreError(KeyError):
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from typing import Any, List, Sequence, Set
|
from typing import Any, List, Sequence
|
||||||
|
|
||||||
from multiaddr import Multiaddr
|
from multiaddr import Multiaddr
|
||||||
|
|
||||||
@ -138,9 +138,3 @@ class IPeerStore(IAddrBook, IPeerMetadata):
|
|||||||
:param key_pair:
|
:param key_pair:
|
||||||
:raise PeerStoreError: if peer ID already has pubkey or privkey set
|
: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
|
|
||||||
"""
|
|
||||||
|
|||||||
Reference in New Issue
Block a user