code: func (m *wsNotificationManager) notifyRelevantTxAccepted(tx *btcutil.Tx,
  	clients map[chan struct{}]*wsClient) {
  
  	clientsToNotify := m.subscribedClients(tx, clients)
  
  	if len(clientsToNotify) != 0 {
  		n := btcjson.NewRelevantTxAcceptedNtfn(txHexString(tx.MsgTx()))
  		marshalled, err := btcjson.MarshalCmd(nil, n)
  		if err != nil {
  			rpcsLog.Errorf("Failed to marshal notification: %v", err)
  			return
  		}
  		for quitChan := range clientsToNotify {
  			clients[quitChan].QueueNotification(marshalled)
  		}
  	}
  }
docs: // notifyRelevantTxAccepted examines the inputs and outputs of the passed
  // transaction, notifying websocket clients of outputs spending to a watched
  // address and inputs spending a watched outpoint.  Any outputs paying to a
  // watched address result in the output being watched as well for future
  // notifications.