@@ -833,6 +833,7 @@ static void wait_and_check_bitcoind(struct plugin *p)
833
833
pid_t child ;
834
834
const char * * cmd = gather_args (bitcoind , "getnetworkinfo" , NULL );
835
835
bool printed = false;
836
+ bool isWarmup = false;
836
837
char * output = NULL ;
837
838
838
839
for (;;) {
@@ -862,17 +863,20 @@ static void wait_and_check_bitcoind(struct plugin *p)
862
863
/* bitcoin/src/rpc/protocol.h:
863
864
* RPC_IN_WARMUP = -28, //!< Client still warming up
864
865
*/
865
- if (WEXITSTATUS (status ) != 28 ) {
866
- if (WEXITSTATUS (status ) == 1 )
867
- bitcoind_failure (p , "Could not connect to bitcoind using"
868
- " bitcoin-cli. Is bitcoind running?" );
869
- bitcoind_failure (p , tal_fmt (bitcoind , "%s exited with code %i: %s" ,
870
- cmd [0 ], WEXITSTATUS (status ), output ));
871
- }
866
+ isWarmup = WEXITSTATUS (status ) == 28 ;
872
867
873
868
if (!printed ) {
874
- plugin_log (p , LOG_UNUSUAL ,
875
- "Waiting for bitcoind to warm up..." );
869
+ if (isWarmup )
870
+ {
871
+ plugin_log (p , LOG_UNUSUAL ,
872
+ "Waiting for bitcoind to warm up..." );
873
+ }
874
+ else
875
+ {
876
+ plugin_log (p , LOG_UNUSUAL ,
877
+ tal_fmt (bitcoind , "%s exited with code %i: %s... retrying" ,
878
+ cmd [0 ], WEXITSTATUS (status ), output ));
879
+ }
876
880
printed = true;
877
881
}
878
882
sleep (1 );
0 commit comments