From 82c65e423b63c66a5b0ebbbae76d2e9eaf13f5e6 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sat, 17 Oct 2015 15:25:18 -0700 Subject: [PATCH] fix mempool PeerState nil conversion bug --- mempool/reactor.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mempool/reactor.go b/mempool/reactor.go index 8d10262a2..bc869390f 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -135,8 +135,12 @@ func (memR *MempoolReactor) broadcastTxRoutine(tickerChan <-chan time.Time, newB } // make sure the peer is up to date - peerState := peer.Get(types.PeerStateKey).(PeerState) - if peerState.GetHeight() < height { + if peerState_i := peer.Get(types.PeerStateKey); peerState_i != nil { + peerState := peerState_i.(PeerState) + if peerState.GetHeight() < height { + continue + } + } else { continue }