OSDN Git Service

fix for golint
authorpaladz <453256728@qq.com>
Sat, 21 Apr 2018 16:45:25 +0000 (00:45 +0800)
committerpaladz <453256728@qq.com>
Sat, 21 Apr 2018 16:45:25 +0000 (00:45 +0800)
consensus/general.go
node/node.go

index 2f2af76..41e8051 100644 (file)
@@ -85,6 +85,7 @@ type Params struct {
        Bech32HRPSegwit string
 }
 
+// ActiveNetParams is ...
 var ActiveNetParams = MainNetParams
 
 // NetParams is the correspondence between chain_id and Params
index 3061d68..5f82e93 100644 (file)
@@ -60,16 +60,15 @@ func NewNode(config *cfg.Config) *Node {
        ctx := context.Background()
        initActiveNetParams(config)
        // Get store
-       txDB := dbm.NewDB("txdb", config.DBBackend, config.DBDir())
-       store := leveldb.NewStore(txDB)
+       coreDB := dbm.NewDB("core", config.DBBackend, config.DBDir())
+       store := leveldb.NewStore(coreDB)
 
        tokenDB := dbm.NewDB("accesstoken", config.DBBackend, config.DBDir())
        accessTokens := accesstoken.NewStore(tokenDB)
 
        // Make event switch
        eventSwitch := types.NewEventSwitch()
-       _, err := eventSwitch.Start()
-       if err != nil {
+       if _, err := eventSwitch.Start(); err != nil {
                cmn.Exit(cmn.Fmt("Failed to start switch: %v", err))
        }