Class UTXOCache

UTXOCache is the the base class of a UTXO storage. It is inherited by UTXOSet and MemoryUTXOSet.

class UTXOCache ;

Methods

NameDescription
clear () Clear the UTXO cache
findUTXO (utxo, value) Get an UTXO, does not return double spend.
getUTXOFinder () Prepare tracking double-spent transactions and return the UTXOFinder delegate
getUTXOs (pubkey) Get UTXOs from the UTXO set
length ()
opApply (dg) Allows iteration on UTXOs
peekUTXO (utxo, value) Get an UTXO, no double-spend protection.
updateUTXOCache (tx, height, commons_budget) Add all of a transaction's outputs to the Utxo set, and remove the spent outputs in the transaction from the set.
updateUTXOLock (utxo, unlock_height) Update lock height of a UTXO
add (utxo, value) Helper function to add an UTXO in the UTXO set.
getUTXO (utxo) Get an UTXO from the UTXO set.
remove (utxo) Helper function to remove an UTXO in the UTXO set.