Skip to content

Commit

Permalink
fix(justfile): Remove skipping funding
Browse files Browse the repository at this point in the history
At times, the script would pass with a non-functioning faucet.
The few seconds saved on skipping funding is not worth the extra debugging
    effort, as `just fund` catches these occurrences.
  • Loading branch information
klochowicz committed Aug 15, 2023
1 parent ce583ed commit c457730
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,7 @@ run-local-android args="":
--dart-define="REGTEST_FAUCET=http://${LOCAL_IP}:8080" --dart-define="COORDINATOR_PORT_HTTP=8000" --flavor local
fund args="":
#!/usr/bin/env bash
BALANCE=$(curl -s localhost:8080/lnd/v1/balance/channels | sed 's/.*"balance":"\{0,1\}\([^,"]*\)"\{0,1\}.*/\1/')
if [ $BALANCE -lt 10000000 ] || [ "{{args}}" = "--force" ] || [ "{{args}}" = "-f" ]
then
echo "Lightning faucet balance is $BALANCE; funding..."
cargo run --example fund
else
echo "Lightning faucet balance is $BALANCE; skipping funding. Pass -f or --force to force."
fi

# Fund remote regtest instance
fund-regtest:
Expand Down

0 comments on commit c457730

Please sign in to comment.