prysm-pulse/cmd/beacon-chain/db/db.go
Raul Jordan a860648960
Reduce Usage of Eth2 Terminology in Prysm (#9104)
* remove all mentions

* more changes

* folder by folder

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-06-26 19:00:33 +00:00

36 lines
938 B
Go

package db
import (
beacondb "github.com/prysmaticlabs/prysm/beacon-chain/db"
"github.com/prysmaticlabs/prysm/shared/cmd"
"github.com/prysmaticlabs/prysm/shared/tos"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
var log = logrus.WithField("prefix", "db")
// Commands for interacting with a beacon chain database.
var Commands = &cli.Command{
Name: "db",
Category: "db",
Usage: "defines commands for interacting with the Ethereum Beacon Node database",
Subcommands: []*cli.Command{
{
Name: "restore",
Description: `restores a database from a backup file`,
Flags: cmd.WrapFlags([]cli.Flag{
cmd.RestoreSourceFileFlag,
cmd.RestoreTargetDirFlag,
}),
Before: tos.VerifyTosAcceptedOrPrompt,
Action: func(cliCtx *cli.Context) error {
if err := beacondb.Restore(cliCtx); err != nil {
log.Fatalf("Could not restore database: %v", err)
}
return nil
},
},
},
}