From 4dc961ec0c79df07783f64dad89eac92ebd25c06 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Thu, 20 Oct 2022 13:23:40 -0400 Subject: [PATCH] fix reactor test by adding new receive --- consensus/reactor_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 303f5e6e2..3d52e95fd 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -297,6 +297,12 @@ func TestReactorReceivePanicsIfInitPeerHasntBeenCalledYet(t *testing.T) { // simulate switch calling Receive before AddPeer assert.Panics(t, func() { reactor.Receive(StateChannel, peer, msg) + reactor.NewReceive(p2p.Envelope{ + ChannelID: StateChannel, + Src: peer, + Message: MustMsgToProto(&HasVoteMessage{Height: 1, + Round: 1, Index: 1, Type: tmproto.PrevoteType}), + }) }) }