Open futurepaul opened 2 years ago
we do something like the bash script below or just an quick & dirty sleep 3
should work :)
function waitForNode () {
while true; do
if $1 getblockchaininfo 2>&1 | grep blocks > /dev/null 2>&1; then
break
fi
sleep 1
done
}
But we can offer a HTTP endpoint like /ready
https://github.com/vulpemventures/nigiri-chopsticks that does this for you if you prefer
we'll try out your bash script technique and I'll let you know if it doesn't work, thank you!
Was trying to use nigiri in a script and the lightning faucet was failing. Turns out the problem is I was calling
nigiri faucet cln 1
too quickly after start, and something wasn't actually ready yet to accomplish that.Not sure best solution to this. Possibly an endpoint to poll for "ready" before continuing the script? Or perhaps best move is I just poll the relevant components myself and continue once I know they're ready.