code: func (m *wsNotificationManager) notifyForTx(ops map[wire.OutPoint]map[chan struct{}]*wsClient,
  	addrs map[string]map[chan struct{}]*wsClient, tx *btcutil.Tx, block *btcutil.Block) {
  
  	if len(ops) != 0 {
  		m.notifyForTxIns(ops, tx, block)
  	}
  	if len(addrs) != 0 {
  		m.notifyForTxOuts(ops, addrs, tx, block)
  	}
  }
docs: // notifyForTx 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.