code: func (ro *rescanOptions) paysWatchedAddr(tx *btcutil.Tx) (bool, error) {
  	anyMatchingOutputs := false
  
  txOutLoop:
  	for outIdx, out := range tx.MsgTx().TxOut {
  		pkScript := out.PkScript
  
  		for _, addr := range ro.watchAddrs {
  			// We'll convert the address into its matching pkScript
  			// to in order to check for a match.
  			addrScript, err := txscript.PayToAddrScript(addr)
  			if err != nil {
  				return false, err
  			}
  
  			// If the script doesn't match, we'll move onto the
  			// next one.
  			if !bytes.Equal(pkScript, addrScript) {
  				continue
  			}
  
  			// At this state, we have a matching output so we'll
  			// mark this transaction as matching.
  			anyMatchingOutputs = true
  
  			// Update the filter by also watching this created
  			// outpoint for the event in the future that it's
  			// spent.
  			hash := tx.Hash()
  			outPoint := wire.OutPoint{
  				Hash:  *hash,
  				Index: uint32(outIdx),
  			}
  			ro.watchInputs = append(ro.watchInputs, InputWithScript{
  				PkScript: pkScript,
  				OutPoint: outPoint,
  			})
  			ro.watchList = append(ro.watchList, pkScript)
  
  			continue txOutLoop
  		}
  	}
  
  	return anyMatchingOutputs, nil
  }
docs: // paysWatchedAddr returns whether the transaction matches the filter by having
  // an output paying to a watched address. If that is the case, this also
  // updates the filter to watch the newly created output going forward.