Reindex the UTXO set after creating a new blockchain
This commit is contained in:
parent
99d1134beb
commit
4f0e04fde7
|
@ -10,6 +10,10 @@ func (cli *CLI) createBlockchain(address string) {
|
||||||
log.Panic("ERROR: Address is not valid")
|
log.Panic("ERROR: Address is not valid")
|
||||||
}
|
}
|
||||||
bc := CreateBlockchain(address)
|
bc := CreateBlockchain(address)
|
||||||
bc.db.Close()
|
defer bc.db.Close()
|
||||||
|
|
||||||
|
UTXOSet := UTXOSet{bc}
|
||||||
|
UTXOSet.Reindex()
|
||||||
|
|
||||||
fmt.Println("Done!")
|
fmt.Println("Done!")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue