From 0b7d2ac63f1e92bf4032cbee9b5764e78526ff3f Mon Sep 17 00:00:00 2001 From: Ivan Kuznetsov Date: Sun, 17 Sep 2017 11:33:58 +0700 Subject: [PATCH] Remove Blockchain.FindUTXO --- blockchain.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/blockchain.go b/blockchain.go index 89aa373..2faa7c6 100644 --- a/blockchain.go +++ b/blockchain.go @@ -187,22 +187,6 @@ func (bc *Blockchain) FindUnspentTransactions(pubKeyHash []byte) []Transaction { return unspentTXs } -// FindUTXO finds and returns all unspent transaction outputs -func (bc *Blockchain) FindUTXO(pubKeyHash []byte) []TXOutput { - var UTXOs []TXOutput - unspentTransactions := bc.FindUnspentTransactions(pubKeyHash) - - for _, tx := range unspentTransactions { - for _, out := range tx.Vout { - if out.IsLockedWithKey(pubKeyHash) { - UTXOs = append(UTXOs, out) - } - } - } - - return UTXOs -} - // FindAllUTXO finds all unspent transaction outputs and returns transactions with spent outputs removed func (bc *Blockchain) FindAllUTXO() map[string]TXOutputs { UTXO := make(map[string]TXOutputs)