Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStringToScriptPublicKey ¶
func ConvertStringToScriptPublicKey(string ScriptPublicKeyString) *externalapi.ScriptPublicKey
ConvertStringToScriptPublicKey converts the given string to a scriptPublicKey
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
func ConvertScriptPublicKeyToString ¶
func ConvertScriptPublicKeyToString(scriptPublicKey *externalapi.ScriptPublicKey) ScriptPublicKeyString
ConvertScriptPublicKeyToString converts the given scriptPublicKey to a string
type UTXOChanges ¶
type UTXOChanges struct { Added map[ScriptPublicKeyString]UTXOOutpointEntryPairs Removed map[ScriptPublicKeyString]UTXOOutpoints }
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) Reset ¶ added in v0.8.10
Reset deletes the whole UTXO index and resyncs it from consensus.
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(blockInsertionResult *externalapi.BlockInsertionResult) (*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