0g-chain/cmd/0gchaind/main.go
0g-wh c949c06fce rebase to kava cosmos 0.47 upgrade
rename

rename

tidy

clean code
2024-08-03 15:05:14 +08:00

27 lines
465 B
Go

package main
import (
"fmt"
"os"
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
"github.com/0glabs/0g-chain/chaincfg"
)
func main() {
chaincfg.SetSDKConfig().Seal()
rootCmd := NewRootCmd()
if err := svrcmd.Execute(rootCmd, chaincfg.EnvPrefix, chaincfg.DefaultNodeHome); err != nil {
switch e := err.(type) {
case server.ErrorCode:
fmt.Println("error")
os.Exit(e.Code)
default:
os.Exit(1)
}
}
}