From 74b6cc9057fd4b3d760033a0ec74c8a66bfa90f4 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 25 Jul 2018 02:56:00 -0400 Subject: [PATCH] rpc: log error when we timeout getting validators from consensus (#2045) --- rpc/core/status.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpc/core/status.go b/rpc/core/status.go index 739e67b86..137aaf422 100644 --- a/rpc/core/status.go +++ b/rpc/core/status.go @@ -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{} } }