lint: remove unnecessary switch statement

Former-commit-id: 831551f32fcce774174ff991a3b3d83b6cda8b84 [formerly 561a47aa73d04ff60994cadb8ff149fe88ae2dc0]
Former-commit-id: da00c165621ad399486474e4298c0acff76a3779
This commit is contained in:
Preston Van Loon 2018-02-09 19:07:51 -05:00
parent 49161d6fb3
commit a92945577a

View File

@ -36,15 +36,14 @@ func subscribeBlockHeaders(c collatorClient) error {
for {
// TODO: Error handling for getting disconnected from the client
select {
case head := <-headerChan:
// Query the current state to see if we are an eligible proposer
log.Info(fmt.Sprintf("Received new header: %v", head.Number.String()))
// TODO: Only run this code on certain periods?
if err := checkShardsForProposal(c, head); err != nil {
return fmt.Errorf("unable to watch shards. %v", err)
}
head := <-headerChan
// Query the current state to see if we are an eligible proposer
log.Info(fmt.Sprintf("Received new header: %v", head.Number.String()))
// TODO: Only run this code on certain periods?
if err := checkShardsForProposal(c, head); err != nil {
return fmt.Errorf("unable to watch shards. %v", err)
}
}
}