ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.81k stars 887 forks source link

cleanup: Use the `-rpcwait` when waiting for bitcoind to warm up #3505

Open cdecker opened 4 years ago

cdecker commented 4 years ago

We currently use a rather lengthy loop to wait for bitcoind to warm up and be ready to serve RPC calls:

https://github.com/ElementsProject/lightning/blob/44d408cc87beb854bdaf60c72108bb4492cfb34b/plugins/bcli.c#L710-L749

This could be simplified if we just call bitcoin-cli with -rpcwait which implements the wait logic internally and allows us to skip checking the returned error (if we get an error it's not the warmup error so we can pass any error up regardless). The downside is that it doesn't allow us to print the warmup ourselves, but we could easily replace that with a single one-shot timer printing the message.

gerceboss commented 7 months ago

@cdecker ,Is there some community where I can discuss about the doubts I have on the code of this repository ? I would like to contribute to the lightning network community. I have started reading the book Mastering the lightning network

vincenzopalazzo commented 7 months ago

@gerceboss you can join discord, there is the link on the Readme

BitcoinJiuJitsu commented 2 months ago

Open bounty on this: https://community.sphinx.chat/p/clt2n32tu2rjujq1jn6g/bounties/2158/2