mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-13 16:55:57 -04:00
Pass in CLI behaviour when creating swarm
This allows us to reuse the swarm setup with a different behaviour for discovering ASBs with a rendezvous node.
This commit is contained in:
parent
2e3601693e
commit
4ffb2f14be
3 changed files with 22 additions and 31 deletions
|
@ -445,12 +445,16 @@ impl BobParams {
|
|||
) -> Result<(cli::EventLoop, cli::EventLoopHandle)> {
|
||||
let tor_socks5_port = get_port()
|
||||
.expect("We don't care about Tor in the tests so we get a free port to disable it.");
|
||||
let mut swarm = swarm::cli(
|
||||
&self.seed,
|
||||
|
||||
let behaviour = cli::Behaviour::new(
|
||||
self.alice_peer_id,
|
||||
tor_socks5_port,
|
||||
self.env_config,
|
||||
self.bitcoin_wallet.clone(),
|
||||
);
|
||||
let mut swarm = swarm::cli(
|
||||
self.seed.derive_libp2p_identity(),
|
||||
tor_socks5_port,
|
||||
behaviour,
|
||||
)
|
||||
.await?;
|
||||
swarm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue