mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-25 07:29:32 -05:00
We don't need to import ourselves
This commit is contained in:
parent
881913ad9c
commit
a31d6febca
@ -1,7 +1,6 @@
|
|||||||
mod bitcoind;
|
mod bitcoind;
|
||||||
mod electrs;
|
mod electrs;
|
||||||
|
|
||||||
use crate::harness;
|
|
||||||
use anyhow::{bail, Context, Result};
|
use anyhow::{bail, Context, Result};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use bitcoin_harness::{BitcoindRpcApi, Client};
|
use bitcoin_harness::{BitcoindRpcApi, Client};
|
||||||
@ -51,7 +50,7 @@ where
|
|||||||
|
|
||||||
let env_config = C::get_config();
|
let env_config = C::get_config();
|
||||||
|
|
||||||
let (monero, containers) = harness::init_containers(&cli).await;
|
let (monero, containers) = init_containers(&cli).await;
|
||||||
monero.init_miner().await.unwrap();
|
monero.init_miner().await.unwrap();
|
||||||
|
|
||||||
let btc_amount = bitcoin::Amount::from_sat(1_000_000);
|
let btc_amount = bitcoin::Amount::from_sat(1_000_000);
|
||||||
@ -62,7 +61,7 @@ where
|
|||||||
|
|
||||||
let electrs_rpc_port = containers
|
let electrs_rpc_port = containers
|
||||||
.electrs
|
.electrs
|
||||||
.get_host_port(harness::electrs::RPC_PORT)
|
.get_host_port(electrs::RPC_PORT)
|
||||||
.expect("Could not map electrs rpc port");
|
.expect("Could not map electrs rpc port");
|
||||||
|
|
||||||
let alice_seed = Seed::random().unwrap();
|
let alice_seed = Seed::random().unwrap();
|
||||||
@ -172,7 +171,7 @@ async fn init_bitcoind_container(
|
|||||||
|
|
||||||
let docker = cli.run_with_args(image, run_args);
|
let docker = cli.run_with_args(image, run_args);
|
||||||
let a = docker
|
let a = docker
|
||||||
.get_host_port(harness::bitcoind::RPC_PORT)
|
.get_host_port(bitcoind::RPC_PORT)
|
||||||
.context("Could not map bitcoind rpc port")?;
|
.context("Could not map bitcoind rpc port")?;
|
||||||
|
|
||||||
let bitcoind_url = {
|
let bitcoind_url = {
|
||||||
@ -212,11 +211,7 @@ pub async fn init_electrs_container(
|
|||||||
bitcoind_container_name: String,
|
bitcoind_container_name: String,
|
||||||
network: String,
|
network: String,
|
||||||
) -> Result<Container<'_, Cli, electrs::Electrs>> {
|
) -> Result<Container<'_, Cli, electrs::Electrs>> {
|
||||||
let bitcoind_rpc_addr = format!(
|
let bitcoind_rpc_addr = format!("{}:{}", bitcoind_container_name, bitcoind::RPC_PORT);
|
||||||
"{}:{}",
|
|
||||||
bitcoind_container_name,
|
|
||||||
harness::bitcoind::RPC_PORT
|
|
||||||
);
|
|
||||||
let image = electrs::Electrs::default()
|
let image = electrs::Electrs::default()
|
||||||
.with_volume(volume)
|
.with_volume(volume)
|
||||||
.with_daemon_rpc_addr(bitcoind_rpc_addr)
|
.with_daemon_rpc_addr(bitcoind_rpc_addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user