func (pool *BlockPool) RemovePeerAtCurrentHeights(err error) {
	peerID := pool.blocks[pool.Height]
	peer, ok := pool.peers[peerID]
	if ok {
		if _, err := peer.BlockAtHeight(pool.Height); err != nil {
			pool.logger.Info("remove peer that hasn't sent block at pool.Height",
				"peer", peerID, "height", pool.Height)
			pool.RemovePeer(peerID, err)
			return
		}
	}
	peerID = pool.blocks[pool.Height+1]
	peer, ok = pool.peers[peerID]
	if ok {
		if _, err := peer.BlockAtHeight(pool.Height + 1); err != nil {
			pool.logger.Info("remove peer that hasn't sent block at pool.Height+1",
				"peer", peerID, "height", pool.Height+1)
			pool.RemovePeer(peerID, err)
			return
		}
	}
}
// RemovePeerAtCurrentHeights checks if a block at pool's height H exists and if not, it removes the
// delivery peer and returns. If a block at height H exists then the check and peer removal is done for H+1.
// This function is called when the FSM is not able to make progress for some time.
// This happens if either the block H or H+1 have not been delivered.
RemovePeerAtCurrentHeights checks if a block at pool's height H exists and if not, it removes the
delivery peer and returns. If a block at height H exists then the check and peer removal is done for H+1.
This function is called when the FSM is not able to make progress for some time.
This happens if either the block H or H+1 have not been delivered.
// RemovePeerAtCurrentHeights checks if a block at pool ' s height H exists and if not it removes the // delivery peer and returns . If a block at height H exists then the check and peer removal is done for H + 1 . // This function is called when the FSM is not able to make progress for some time . // This happens if either the block H or H + 1 have not been delivered .
func (pool *BlockPool) RemovePeerAtCurrentHeights(err error) {
	peerID := pool.blocks[pool.Height]
	peer, ok := pool.peers[peerID]
	if ok {
		if _, err := peer.BlockAtHeight(pool.Height); err != nil {
			pool.logger.Info("remove peer that hasn't sent block at pool.Height",
				"peer", peerID, "height", pool.Height)
			pool.RemovePeer(peerID, err)
			return
		}
	}
	peerID = pool.blocks[pool.Height+1]
	peer, ok = pool.peers[peerID]
	if ok {
		if _, err := peer.BlockAtHeight(pool.Height + 1); err != nil {
			pool.logger.Info("remove peer that hasn't sent block at pool.Height+1",
				"peer", peerID, "height", pool.Height+1)
			pool.RemovePeer(peerID, err)
			return
		}
	}
}
func ( pool * BlockPool ) RemovePeerAtCurrentHeights ( err error ) { peerID := pool . blocks [ pool . Height ] peer , ok := pool . peers [ peerID ] if ok { if _ , err := peer . BlockAtHeight ( pool . Height ) ; err != nil { pool . logger . Info ( " " , " " , peerID , " " , pool . Height ) pool . RemovePeer ( peerID , err ) return } } peerID = pool . blocks [ pool . Height + 1 ] peer , ok = pool . peers [ peerID ] if ok { if _ , err := peer . BlockAtHeight ( pool . Height + 1 ) ; err != nil { pool . logger . Info ( " " , " " , peerID , " " , pool . Height + 1 ) pool . RemovePeer ( peerID , err ) return } } }
RemovePeerAtCurrentHeights checks if a block at pool's height H exists and if not, it removes the
delivery peer and returns.
RemovePeerAtCurrentHeights checks if a block at pool ' s height H exists and if not it removes the delivery peer and returns .