Browse Source

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

pull/2006/merge
Ethan Buchman 7 years ago
committed by Anton Kaliaev
parent
commit
74b6cc9057
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      rpc/core/status.go

+ 3
- 0
rpc/core/status.go 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{}
}
}

Loading…
Cancel
Save