mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Update tests for new logic
This commit is contained in:
@ -3,6 +3,8 @@ from contextlib import suppress
|
||||
|
||||
import multiaddr
|
||||
|
||||
from Crypto.PublicKey import RSA
|
||||
|
||||
from libp2p import new_node
|
||||
from libp2p.peer.peerinfo import info_from_p2p_addr
|
||||
|
||||
@ -53,3 +55,8 @@ async def perform_two_host_set_up_custom_handler(handler):
|
||||
# Associate the peer with local ip address (see default parameters of Libp2p())
|
||||
node_a.get_peerstore().add_addrs(node_b.get_id(), node_b.get_addrs(), 10)
|
||||
return node_a, node_b
|
||||
|
||||
|
||||
def generate_new_private_key():
|
||||
new_key = RSA.generate(2048, e=65537)
|
||||
return new_key
|
||||
|
||||
Reference in New Issue
Block a user