code: func (*wsNotificationManager) notifyFilteredBlockDisconnected(clients map[chan struct{}]*wsClient,
  	block *btcutil.Block) {
  	// Skip notification creation if no clients have requested block
  	// connected/disconnected notifications.
  	if len(clients) == 0 {
  		return
  	}
  
  	// Notify interested websocket clients about the disconnected block.
  	var w bytes.Buffer
  	err := block.MsgBlock().Header.Serialize(&w)
  	if err != nil {
  		rpcsLog.Errorf("Failed to serialize header for filtered block "+
  			"disconnected notification: %v", err)
  		return
  	}
  	ntfn := btcjson.NewFilteredBlockDisconnectedNtfn(block.Height(),
  		hex.EncodeToString(w.Bytes()))
  	marshalledJSON, err := btcjson.MarshalCmd(nil, ntfn)
  	if err != nil {
  		rpcsLog.Errorf("Failed to marshal filtered block disconnected "+
  			"notification: %v", err)
  		return
  	}
  	for _, wsc := range clients {
  		wsc.QueueNotification(marshalledJSON)
  	}
  }
docs: // notifyFilteredBlockDisconnected notifies websocket clients that have registered for
  // block updates when a block is disconnected from the main chain (due to a
  // reorganize).