mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Improve error message if stuff fails directly in main
This commit is contained in:
parent
37f97ac471
commit
5c24a46298
@ -72,10 +72,10 @@ async fn main() -> Result<()> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let db = Database::open(config.data.dir.join("database").as_path())
|
let db = Database::open(config.data.dir.join("database").as_path())
|
||||||
.context("Could not open database")?;
|
.context("Failed to open database")?;
|
||||||
|
|
||||||
let seed =
|
let seed =
|
||||||
Seed::from_file_or_generate(&config.data.dir).expect("Could not retrieve/initialize seed");
|
Seed::from_file_or_generate(&config.data.dir).context("Failed to read in seed file")?;
|
||||||
|
|
||||||
// hardcode to testnet/stagenet
|
// hardcode to testnet/stagenet
|
||||||
let bitcoin_network = bitcoin::Network::Testnet;
|
let bitcoin_network = bitcoin::Network::Testnet;
|
||||||
@ -254,7 +254,8 @@ async fn init_bitcoin_wallet(
|
|||||||
&wallet_dir,
|
&wallet_dir,
|
||||||
seed.derive_extended_private_key(network)?,
|
seed.derive_extended_private_key(network)?,
|
||||||
)
|
)
|
||||||
.await?;
|
.await
|
||||||
|
.context("Failed to initialize Bitcoin wallet")?;
|
||||||
|
|
||||||
wallet.sync().await?;
|
wallet.sync().await?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user