Browse Source

fix

pull/8085/head
tycho garen 3 years ago
parent
commit
eee32bdc25
1 changed files with 4 additions and 5 deletions
  1. +4
    -5
      internal/statesync/reactor_test.go

+ 4
- 5
internal/statesync/reactor_test.go View File

@ -795,13 +795,11 @@ func handleConsensusParamsRequest(
case <-ctx.Done(): case <-ctx.Done():
return return
case envelope := <-receiving: case envelope := <-receiving:
if ctx.Err() != nil {
msg, ok := envelope.Message.(*ssproto.ParamsRequest)
if !ok {
t.Errorf("message was %T which is not a params request", envelope.Message)
return return
} }
t.Log("received consensus params request")
msg, ok := envelope.Message.(*ssproto.ParamsRequest)
require.True(t, ok)
select { select {
case sending <- p2p.Envelope{ case sending <- p2p.Envelope{
From: envelope.To, From: envelope.To,
@ -811,6 +809,7 @@ func handleConsensusParamsRequest(
}, },
}: }:
case <-ctx.Done(): case <-ctx.Done():
return
case <-closeCh: case <-closeCh:
return return
} }


Loading…
Cancel
Save