mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
lint: remove unnecessary switch statement
Former-commit-id: 831551f32fcce774174ff991a3b3d83b6cda8b84 [formerly 561a47aa73d04ff60994cadb8ff149fe88ae2dc0] Former-commit-id: da00c165621ad399486474e4298c0acff76a3779
This commit is contained in:
parent
49161d6fb3
commit
a92945577a
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user