code: func (m *SubscriptionManager) handleNewSubscription(sub *newSubscription) error {
  	log.Infof("Registering block subscription: id=%d", sub.id)
  
  	// We'll start by retrieving a backlog of notifications from the
  	// client's best height.
  	blocks, currentHeight, err := m.ntfnSource.NotificationsSinceHeight(
  		sub.bestHeight,
  	)
  	if err != nil {
  		return fmt.Errorf("unable to retrieve blocks since height=%d: "+
  			"%v", sub.bestHeight, err)
  	}
  
  	// We'll then attempt to deliver these notifications.
  	log.Debugf("Delivering backlog of block notifications: id=%d, "+
  		"start_height=%d, end_height=%d", sub.id, sub.bestHeight,
  		currentHeight)
  
  	for _, block := range blocks {
  		m.notifySubscriber(sub, block)
  	}
  
  	// With the notifications delivered, we can keep track of the new client
  	// internally in order to deliver new block notifications about the
  	// chain.
  	m.subscribers[sub.id] = sub
  
  	return nil
  }
docs: // handleNewSubscription handles a request to create a new block subscription.