diff --git a/blockchain.go b/blockchain.go index bbcb976..e00fb40 100644 --- a/blockchain.go +++ b/blockchain.go @@ -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() diff --git a/utxo_set.go b/utxo_set.go index c85cf92..96cea33 100644 --- a/utxo_set.go +++ b/utxo_set.go @@ -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))