Documentation ¶
Index ¶
- type ScriptPublicKeyString
- type UTXOChanges
- type UTXOIndex
- func (ui *UTXOIndex) GetCirculatingSompiSupply() (uint64, error)
- func (ui *UTXOIndex) Reset() error
- func (ui *UTXOIndex) UTXOs(scriptPublicKey *externalapi.ScriptPublicKey) (UTXOOutpointEntryPairs, error)
- func (ui *UTXOIndex) Update(virtualChangeSet *externalapi.VirtualChangeSet) (*UTXOChanges, error)
- type UTXOOutpointEntryPairs
- type UTXOOutpoints
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScriptPublicKeyString ¶
type ScriptPublicKeyString string
ScriptPublicKeyString is a script public key represented as a string We use this type rather than just a byte slice because Go maps don't support slices as keys. See: UTXOChanges
type UTXOChanges ¶
type UTXOChanges struct { Added map[ScriptPublicKeyString]UTXOOutpointEntryPairs Removed map[ScriptPublicKeyString]UTXOOutpointEntryPairs }
UTXOChanges is the set of changes made to the UTXO index after a successful update
type UTXOIndex ¶
type UTXOIndex struct {
// contains filtered or unexported fields
}
UTXOIndex maintains an index between transaction scriptPublicKeys and UTXOs
func New ¶
New creates a new UTXO index.
NOTE: While this is called no new blocks can be added to the consensus.
func (*UTXOIndex) GetCirculatingSompiSupply ¶
GetCirculatingSompiSupply returns the current circulating supply of sompis in the network
func (*UTXOIndex) UTXOs ¶
func (ui *UTXOIndex) UTXOs(scriptPublicKey *externalapi.ScriptPublicKey) (UTXOOutpointEntryPairs, error)
UTXOs returns all the UTXOs for the given scriptPublicKey
func (*UTXOIndex) Update ¶
func (ui *UTXOIndex) Update(virtualChangeSet *externalapi.VirtualChangeSet) (*UTXOChanges, error)
Update updates the UTXO index with the given DAG selected parent chain changes
type UTXOOutpointEntryPairs ¶
type UTXOOutpointEntryPairs map[externalapi.DomainOutpoint]externalapi.UTXOEntry
UTXOOutpointEntryPairs is a map between UTXO outpoints to UTXO entries
type UTXOOutpoints ¶
type UTXOOutpoints map[externalapi.DomainOutpoint]interface{}
UTXOOutpoints is a set of UTXO outpoints