code: func (ro *rescanOptions) spendsWatchedInput(tx *btcutil.Tx) bool {
  	for _, in := range tx.MsgTx().TxIn {
  		for _, input := range ro.watchInputs {
  			switch {
  			// If we're watching for a zero outpoint, then we should
  			// match on the output script being spent instead.
  			case input.OutPoint == zeroOutPoint:
  				pkScript, err := txscript.ComputePkScript(
  					in.SignatureScript, in.Witness,
  				)
  				if err != nil {
  					continue
  				}
  
  				if bytes.Equal(pkScript.Script(), input.PkScript) {
  					return true
  				}
  
  			// Otherwise, we'll match on the outpoint being spent.
  			case in.PreviousOutPoint == input.OutPoint:
  				return true
  			}
  		}
  	}
  	return false
  }
docs: // spendsWatchedInput returns whether the transaction matches the filter by
  // spending a watched input.