FindAllUTXO → FindUTXO
This commit is contained in:
parent
4f0e04fde7
commit
47737a28af
|
@ -116,8 +116,8 @@ func (bc *Blockchain) FindTransaction(ID []byte) (Transaction, error) {
|
|||
return Transaction{}, errors.New("Transaction is not found")
|
||||
}
|
||||
|
||||
// FindAllUTXO finds all unspent transaction outputs and returns transactions with spent outputs removed
|
||||
func (bc *Blockchain) FindAllUTXO() map[string]TXOutputs {
|
||||
// FindUTXO finds all unspent transaction outputs and returns transactions with spent outputs removed
|
||||
func (bc *Blockchain) FindUTXO() map[string]TXOutputs {
|
||||
UTXO := make(map[string]TXOutputs)
|
||||
spentTXOs := make(map[string][]int)
|
||||
bci := bc.Iterator()
|
||||
|
|
|
@ -121,7 +121,7 @@ func (u UTXOSet) Reindex() {
|
|||
log.Panic(err)
|
||||
}
|
||||
|
||||
UTXO := u.Blockchain.FindAllUTXO()
|
||||
UTXO := u.Blockchain.FindUTXO()
|
||||
|
||||
err = db.Update(func(tx *bolt.Tx) error {
|
||||
b := tx.Bucket([]byte(utxoBucket))
|
||||
|
|
Loading…
Reference in New Issue