Browse Source

fix mempool PeerState nil conversion bug

pull/157/head
Jae Kwon 9 years ago
parent
commit
82c65e423b
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      mempool/reactor.go

+ 6
- 2
mempool/reactor.go View File

@ -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
}


Loading…
Cancel
Save