blockchain_go/cli_reindexutxo.go

13 lines
240 B
Go

package main
import "fmt"
func (cli *CLI) reindexUTXO() {
bc := NewBlockchain()
UTXOSet := UTXOSet{bc}
UTXOSet.Reindex()
count := UTXOSet.CountTransactions()
fmt.Printf("Done! There are %d transactions in the UTXO set.\n", count)
}