code: func (mp *TxPool) fetchInputUtxos(tx *btcutil.Tx) (*blockchain.UtxoViewpoint, error) {
  	utxoView, err := mp.cfg.FetchUtxoView(tx)
  	if err != nil {
  		return nil, err
  	}
  
  	// Attempt to populate any missing inputs from the transaction pool.
  	for _, txIn := range tx.MsgTx().TxIn {
  		prevOut := &txIn.PreviousOutPoint
  		entry := utxoView.LookupEntry(*prevOut)
  		if entry != nil && !entry.IsSpent() {
  			continue
  		}
  
  		if poolTxDesc, exists := mp.pool[prevOut.Hash]; exists {
  			// AddTxOut ignores out of range index values, so it is
  			// safe to call without bounds checking here.
  			utxoView.AddTxOut(poolTxDesc.Tx, prevOut.Index,
  				mining.UnminedHeight)
  		}
  	}
  
  	return utxoView, nil
  }
docs: // fetchInputUtxos loads utxo details about the input transactions referenced by
  // the passed transaction.  First, it loads the details form the viewpoint of
  // the main chain, then it adjusts them based upon the contents of the
  // transaction pool.
  //
  // This function MUST be called with the mempool lock held (for reads).