code: func (view *UtxoViewpoint) AddTxOut(tx *btcutil.Tx, txOutIdx uint32, blockHeight int32) {
  	// Can't add an output for an out of bounds index.
  	if txOutIdx >= uint32(len(tx.MsgTx().TxOut)) {
  		return
  	}
  
  	// Update existing entries.  All fields are updated because it's
  	// possible (although extremely unlikely) that the existing entry is
  	// being replaced by a different transaction with the same hash.  This
  	// is allowed so long as the previous transaction is fully spent.
  	prevOut := wire.OutPoint{Hash: *tx.Hash(), Index: txOutIdx}
  	txOut := tx.MsgTx().TxOut[txOutIdx]
  	view.addTxOut(prevOut, txOut, IsCoinBase(tx), blockHeight)
  }
docs: // AddTxOut adds the specified output of the passed transaction to the view if
  // it exists and is not provably unspendable.  When the view already has an
  // entry for the output, it will be marked unspent.  All fields will be updated
  // for existing entries since it's possible it has changed during a reorg.