Stop blockConnected handler if no wallet connected

This commit is contained in:
jholdstock 2020-10-01 10:53:04 +01:00 committed by David Hill
parent c82b08b760
commit 288aa09c6d

View File

@ -154,6 +154,7 @@ func blockConnected() {
walletClients, failedConnections := walletRPC.Clients(ctx, netParams) walletClients, failedConnections := walletRPC.Clients(ctx, netParams)
if len(walletClients) == 0 { if len(walletClients) == 0 {
log.Errorf("%s: Could not connect to any wallets", funcName) log.Errorf("%s: Could not connect to any wallets", funcName)
return
} }
if len(failedConnections) > 0 { if len(failedConnections) > 0 {
log.Errorf("%s: Failed to connect to %d wallet(s), proceeding with only %d", log.Errorf("%s: Failed to connect to %d wallet(s), proceeding with only %d",