FindAllUTXO → FindUTXO

This commit is contained in:
Ivan Kuznetsov 2017-09-17 12:44:43 +07:00
parent 4f0e04fde7
commit 47737a28af
2 changed files with 3 additions and 3 deletions

View File

@ -116,8 +116,8 @@ func (bc *Blockchain) FindTransaction(ID []byte) (Transaction, error) {
return Transaction{}, errors.New("Transaction is not found") return Transaction{}, errors.New("Transaction is not found")
} }
// FindAllUTXO finds all unspent transaction outputs and returns transactions with spent outputs removed // FindUTXO finds all unspent transaction outputs and returns transactions with spent outputs removed
func (bc *Blockchain) FindAllUTXO() map[string]TXOutputs { func (bc *Blockchain) FindUTXO() map[string]TXOutputs {
UTXO := make(map[string]TXOutputs) UTXO := make(map[string]TXOutputs)
spentTXOs := make(map[string][]int) spentTXOs := make(map[string][]int)
bci := bc.Iterator() bci := bc.Iterator()

View File

@ -121,7 +121,7 @@ func (u UTXOSet) Reindex() {
log.Panic(err) log.Panic(err)
} }
UTXO := u.Blockchain.FindAllUTXO() UTXO := u.Blockchain.FindUTXO()
err = db.Update(func(tx *bolt.Tx) error { err = db.Update(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte(utxoBucket)) b := tx.Bucket([]byte(utxoBucket))