code: func (s *ChainService) handleBanPeerMsg(state *peerState, sp *ServerPeer) {
  	host, _, err := net.SplitHostPort(sp.Addr())
  	if err != nil {
  		log.Debugf("can't split ban peer %s: %s", sp.Addr(), err)
  		return
  	}
  	log.Infof("Banned peer %s for %v", host, BanDuration)
  	state.banned[host] = time.Now().Add(BanDuration)
  }
docs: // handleBanPeerMsg deals with banning peers.  It is invoked from the
  // peerHandler goroutine.