mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-07-24 07:21:02 -04:00
Deterministic peer id from seed for bob
This commit is contained in:
parent
0a21040e08
commit
f18d01dfaf
3 changed files with 21 additions and 3 deletions
|
@ -192,7 +192,8 @@ pub fn init_bob_event_loop(
|
|||
alice_peer_id: PeerId,
|
||||
alice_addr: Multiaddr,
|
||||
) -> (bob::event_loop::EventLoop, bob::event_loop::EventLoopHandle) {
|
||||
let bob_behaviour = bob::Behaviour::default();
|
||||
let seed = Seed::random().unwrap();
|
||||
let bob_behaviour = bob::Behaviour::new(network::Seed::new(seed.bytes()));
|
||||
let bob_transport = build(bob_behaviour.identity()).unwrap();
|
||||
bob::event_loop::EventLoop::new(bob_transport, bob_behaviour, alice_peer_id, alice_addr)
|
||||
.unwrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue