mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Apply PR feedback: add_key_pair
This commit is contained in:
@ -36,8 +36,7 @@ from .utils import connect, connect_swarm
|
||||
|
||||
def initialize_peerstore_with_our_keypair(self_id: ID, key_pair: KeyPair) -> PeerStore:
|
||||
peer_store = PeerStore()
|
||||
peer_store.add_pubkey(self_id, key_pair.public_key)
|
||||
peer_store.add_privkey(self_id, key_pair.private_key)
|
||||
peer_store.add_key_pair(self_id, key_pair)
|
||||
return peer_store
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user