mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-05 09:14:28 +00:00
68eba02cc2
* Remove most of the remaining geth code and set up bazel for this * chmod +x * Add flake check * better flake detection Former-commit-id: 5c332ecbf2923943f646f1fe40befa95be883329 [formerly 99590fc354514584700e5ce8d7d30a8a7d541f29] Former-commit-id: e5f919b553fe698e98090965d34eb721990b5693
77 lines
2.0 KiB
Go
77 lines
2.0 KiB
Go
// Copyright 2014 The go-ethereum Authors
|
|
// This file is part of go-ethereum.
|
|
//
|
|
// go-ethereum is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// go-ethereum is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
// geth is the official command-line client for Ethereum.
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"runtime"
|
|
"sort"
|
|
|
|
"github.com/prysmaticlabs/geth-sharding/cmd/utils"
|
|
"github.com/prysmaticlabs/geth-sharding/internal/debug"
|
|
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
)
|
|
|
|
var (
|
|
// Git SHA1 commit hash of the release (set via linker flags)
|
|
gitCommit = ""
|
|
// The app that holds all commands and flags.
|
|
app = utils.NewApp(gitCommit, "the go-ethereum command line interface")
|
|
// flags that configure the node
|
|
nodeFlags = []cli.Flag{
|
|
utils.DataDirFlag,
|
|
utils.PasswordFileFlag,
|
|
utils.NetworkIdFlag,
|
|
utils.DepositFlag,
|
|
utils.ActorFlag,
|
|
utils.ShardIDFlag,
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
// Initialize the CLI app and start Geth
|
|
app.HideVersion = true // we have a command to print the version
|
|
app.Commands = []cli.Command{
|
|
// See shardingcmd.go:
|
|
shardingCommand,
|
|
}
|
|
sort.Sort(cli.CommandsByName(app.Commands))
|
|
|
|
app.Flags = append(app.Flags, nodeFlags...)
|
|
app.Flags = append(app.Flags, debug.Flags...)
|
|
|
|
app.Before = func(ctx *cli.Context) error {
|
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
|
return debug.Setup(ctx)
|
|
}
|
|
|
|
app.After = func(ctx *cli.Context) error {
|
|
debug.Exit()
|
|
return nil
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
if err := app.Run(os.Args); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|