0g-chain/cmd/0gchaind/main.go

30 lines
530 B
Go
Raw Normal View History

package main
import (
2024-08-02 10:34:24 +00:00
"fmt"
"os"
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
2024-05-01 04:26:39 +00:00
"github.com/0glabs/0g-chain/chaincfg"
)
func main() {
2024-08-02 10:34:24 +00:00
fmt.Println("main")
2024-05-01 04:26:39 +00:00
chaincfg.SetSDKConfig().Seal()
2024-08-02 10:34:24 +00:00
fmt.Println("main2")
2024-05-01 04:26:39 +00:00
rootCmd := NewRootCmd()
if err := svrcmd.Execute(rootCmd, chaincfg.EnvPrefix, chaincfg.DefaultNodeHome); err != nil {
switch e := err.(type) {
case server.ErrorCode:
2024-08-02 10:34:24 +00:00
fmt.Println("error")
os.Exit(e.Code)
default:
os.Exit(1)
}
}
2024-08-02 10:34:24 +00:00
fmt.Println("main3")
}