Remove Blockchain.FindUTXO

This commit is contained in:
Ivan Kuznetsov 2017-09-17 11:33:58 +07:00
parent e3739acac9
commit 0b7d2ac63f
1 changed files with 0 additions and 16 deletions

View File

@ -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)