-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.go
40 lines (34 loc) · 952 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"github.com/bazo-blockchain/bazo-client/cli"
"github.com/bazo-blockchain/bazo-client/client"
"github.com/bazo-blockchain/bazo-client/cstorage"
"github.com/bazo-blockchain/bazo-client/network"
"github.com/bazo-blockchain/bazo-client/util"
"github.com/bazo-blockchain/bazo-miner/p2p"
cli2 "github.com/urfave/cli"
"os"
)
func main() {
p2p.InitLogging()
client.InitLogging()
logger := util.InitLogger()
util.Config = util.LoadConfiguration()
network.Init()
cstorage.Init("client.db")
app := cli2.NewApp()
app.Name = "bazo-client"
app.Usage = "the command line interface for interacting with the Bazo blockchain implemented in Go."
app.Version = "1.0.0"
app.Commands = []cli2.Command {
cli.GetAccountCommand(logger),
cli.GetFundsCommand(logger),
cli.GetNetworkCommand(logger),
cli.GetRestCommand(),
cli.GetStakingCommand(logger),
}
err := app.Run(os.Args)
if err != nil {
logger.Fatal(err)
}
}