0g-chain/cmd/0gchaind/main.go
0xsatoshi 9b4a1e6b32 fix
2024-05-04 14:26:54 +08:00

27 lines
436 B
Go

package main
import (
"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:
os.Exit(e.Code)
default:
os.Exit(1)
}
}
}