Documentation ¶
Index ¶
- type UTXOSet
- func (utx *UTXOSet) Blockchain() *blockchain.Blockchain
- func (utx *UTXOSet) CountTransactions() int
- func (utx *UTXOSet) FindSpendableOutputs(pubkeyHash []byte, amount int) (int, map[string][]int)
- func (utx *UTXOSet) FindUTXO(pubKeyHash []byte) []transaction.TXOutput
- func (utx *UTXOSet) Reindex()
- func (utx *UTXOSet) Update(block *blockchain.Block)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UTXOSet ¶
type UTXOSet struct {
// contains filtered or unexported fields
}
UTXOSet represents UTXO set
func NewUTXOSet ¶
func NewUTXOSet(blockchain *blockchain.Blockchain) *UTXOSet
NewUTXOSet creates instance UTXOSet
func (*UTXOSet) Blockchain ¶
func (utx *UTXOSet) Blockchain() *blockchain.Blockchain
func (*UTXOSet) CountTransactions ¶
CountTransactions returns the number of transactions in the UTXO set
func (*UTXOSet) FindSpendableOutputs ¶
FindSpendableOutputs finds and returns unspent outputs to reference in inputs
func (*UTXOSet) FindUTXO ¶
func (utx *UTXOSet) FindUTXO(pubKeyHash []byte) []transaction.TXOutput
FindUTXO finds UTXO for a public key hash
func (*UTXOSet) Update ¶
func (utx *UTXOSet) Update(block *blockchain.Block)
Update updates the UTXO set with transactions from the Block The Block is considered to be the tip of a blockchain
Click to show internal directories.
Click to hide internal directories.