code: func (b *batchSpendReporter) notifySpends(block *wire.MsgBlock,
  	height uint32) map[wire.OutPoint]*SpendReport {
  
  	spends := make(map[wire.OutPoint]*SpendReport)
  	for _, tx := range block.Transactions {
  		// Check each input to see if this transaction spends one of our
  		// watched outpoints.
  		for i, ti := range tx.TxIn {
  			outpoint := ti.PreviousOutPoint
  
  			// Find the requests this spend relates to.
  			requests, ok := b.requests[outpoint]
  			if !ok {
  				continue
  			}
  
  			log.Debugf("UTXO %v spent by txn %v", outpoint,
  				tx.TxHash())
  
  			spend := &SpendReport{
  				SpendingTx:         tx,
  				SpendingInputIndex: uint32(i),
  				SpendingTxHeight:   height,
  			}
  
  			spends[outpoint] = spend
  
  			// With the requests located, we remove this outpoint
  			// from both the requests, outpoints, and initial txns
  			// map. This will ensures we don't continue watching
  			// this outpoint.
  			b.notifyRequests(&outpoint, requests, spend, nil)
  		}
  	}
  
  	return spends
  }
docs: // notifySpends finds any transactions in the block that spend from our watched
  // outpoints. If a spend is detected, it is immediately delivered and cleaned up
  // from the reporter's internal state.