rpc: log error when we timeout getting validators from consensus (#2045)

This commit is contained in:
Ethan Buchman
2018-07-25 02:56:00 -04:00
committed by Anton Kaliaev
parent 60378fd7f9
commit 74b6cc9057

View File

@ -166,6 +166,9 @@ func getValidatorsWithTimeout(
case res := <-resultCh:
return res.lastBlockHeight, res.vals
case <-time.After(t):
if logger != nil {
logger.Error("Timed out querying validators from consensus", "timeout", t)
}
return -1, []*types.Validator{}
}
}