|
@ -97,7 +97,12 @@ func (memR *MempoolReactor) Receive(chID byte, src *p2p.Peer, msgBytes []byte) { |
|
|
func (memR *MempoolReactor) ResetForBlockAndState(block *types.Block, state *sm.State) { |
|
|
func (memR *MempoolReactor) ResetForBlockAndState(block *types.Block, state *sm.State) { |
|
|
ri := memR.Mempool.ResetForBlockAndState(block, state) |
|
|
ri := memR.Mempool.ResetForBlockAndState(block, state) |
|
|
for _, peer := range memR.Switch.Peers().List() { |
|
|
for _, peer := range memR.Switch.Peers().List() { |
|
|
peerMempoolCh := peer.Data.Get(types.PeerMempoolChKey).(chan ResetInfo) |
|
|
|
|
|
|
|
|
peerMempoolChI := peer.Data.Get(types.PeerMempoolChKey) |
|
|
|
|
|
if peerMempoolChI == nil { |
|
|
|
|
|
// peer was added to switch but not yet to the memR
|
|
|
|
|
|
continue |
|
|
|
|
|
} |
|
|
|
|
|
peerMempoolCh := peerMempoolChI.(chan ResetInfo) |
|
|
select { |
|
|
select { |
|
|
case peerMempoolCh <- ri: |
|
|
case peerMempoolCh <- ri: |
|
|
default: |
|
|
default: |
|
|