Skip to content

Commit

Permalink
chore: Fund XXL
Browse files Browse the repository at this point in the history
by sending 5 times to the coordinator's wallet we ensure that he has 5 utxos available. This comes handy because now we need on-chain funds to open channels and we might empty the wallet fast
  • Loading branch information
bonomat committed Jan 16, 2024
1 parent f1eab8e commit 1984554
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/fund/examples/fund.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ async fn fund_everything(faucet: &str, coordinator: &str) -> Result<()> {

let bitcoind = bitcoind::Bitcoind::new(client, faucet.to_string() + "/bitcoin");

bitcoind
.fund(&coord_addr, Amount::ONE_BTC)
.await
.context("Could not fund the faucet's on-chain wallet")?;
for _ in 0..5 {
bitcoind
.fund(&coord_addr, Amount::ONE_BTC)
.await
.context("Could not fund the faucet's on-chain wallet")?;
}

bitcoind.mine(10).await?;

coordinator.sync_wallet().await?;
Expand Down

0 comments on commit 1984554

Please sign in to comment.