code: func dbPutUtxoView(dbTx database.Tx, view *UtxoViewpoint) error {
  	utxoBucket := dbTx.Metadata().Bucket(utxoSetBucketName)
  	for outpoint, entry := range view.entries {
  		// No need to update the database if the entry was not modified.
  		if entry == nil || !entry.isModified() {
  			continue
  		}
  
  		// Remove the utxo entry if it is spent.
  		if entry.IsSpent() {
  			key := outpointKey(outpoint)
  			err := utxoBucket.Delete(*key)
  			recycleOutpointKey(key)
  			if err != nil {
  				return err
  			}
  
  			continue
  		}
  
  		// Serialize and store the utxo entry.
  		serialized, err := serializeUtxoEntry(entry)
  		if err != nil {
  			return err
  		}
  		key := outpointKey(outpoint)
  		err = utxoBucket.Put(*key, serialized)
  		// NOTE: The key is intentionally not recycled here since the
  		// database interface contract prohibits modifications.  It will
  		// be garbage collected normally when the database is done with
  		// it.
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // dbPutUtxoView uses an existing database transaction to update the utxo set
  // in the database based on the provided utxo view contents and state.  In
  // particular, only the entries that have been marked as modified are written
  // to the database.