blockchain_go/cli_createblockchain.go

16 lines
241 B
Go

package main
import (
"fmt"
"log"
)
func (cli *CLI) createBlockchain(address string) {
if !ValidateAddress(address) {
log.Panic("ERROR: Address is not valid")
}
bc := CreateBlockchain(address)
bc.db.Close()
fmt.Println("Done!")
}