Dont fail wallet connection if wallet is locked

This commit is contained in:
jholdstock 2020-06-30 10:17:05 +01:00 committed by David Hill
parent aed1e5f5d4
commit 7f969c6db5

View File

@ -113,10 +113,9 @@ func (w *WalletConnect) Clients(ctx context.Context, netParams *chaincfg.Params)
log.Errorf("wallet '%s' has voting disabled", c.String()) log.Errorf("wallet '%s' has voting disabled", c.String())
} }
if !walletInfo.Unlocked { if !walletInfo.Unlocked {
// If wallet is locked, ImportPrivKey cannot be used. // SetVoteChoice can still be used even if the wallet is locked, so
// just log an error here. Don't count this as a failed connection.
log.Errorf("wallet '%s' is not unlocked", c.String()) log.Errorf("wallet '%s' is not unlocked", c.String())
failedConnections++
continue
} }
walletClients = append(walletClients, walletRPC) walletClients = append(walletClients, walletRPC)