code: func extractBlockMatches(chain ChainSource, ro *rescanOptions,
  	curStamp *waddrmgr.BlockStamp) ([]*btcutil.Tx, error) {
  
  	// We've matched. Now we actually get the block and cycle through the
  	// transactions to see which ones are relevant.
  	block, err := chain.GetBlock(curStamp.Hash, ro.queryOptions...)
  	if err != nil {
  		return nil, err
  	}
  	if block == nil {
  		return nil, fmt.Errorf("Couldn't get block %d (%s) from "+
  			"network", curStamp.Height, curStamp.Hash)
  	}
  
  	blockHeader := block.MsgBlock().Header
  	blockDetails := btcjson.BlockDetails{
  		Height: block.Height(),
  		Hash:   block.Hash().String(),
  		Time:   blockHeader.Timestamp.Unix(),
  	}
  
  	relevantTxs := make([]*btcutil.Tx, 0, len(block.Transactions()))
  	for txIdx, tx := range block.Transactions() {
  		txDetails := blockDetails
  		txDetails.Index = txIdx
  
  		var relevant bool
  
  		if ro.spendsWatchedInput(tx) {
  			relevant = true
  			if ro.ntfn.OnRedeemingTx != nil {
  				ro.ntfn.OnRedeemingTx(tx, &txDetails)
  			}
  		}
  
  		// Even though the transaction may already be known as relevant
  		// and there might not be a notification callback, we need to
  		// call paysWatchedAddr anyway as it updates the rescan
  		// options.
  		pays, err := ro.paysWatchedAddr(tx)
  		if err != nil {
  			return nil, err
  		}
  
  		if pays {
  			relevant = true
  			if ro.ntfn.OnRecvTx != nil {
  				ro.ntfn.OnRecvTx(tx, &txDetails)
  			}
  		}
  
  		if relevant {
  			relevantTxs = append(relevantTxs, tx)
  		}
  	}
  
  	return relevantTxs, nil
  }
docs: // extractBlockMatches fetches the target block from the network, and filters
  // out any relevant transactions found within the block.