Skip to content

Commit

Permalink
go/oasis-node/cmd/genesis: Omit redundant sanity check in check command
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanez committed Feb 19, 2021
1 parent 20e895a commit 01e2f71
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions go/oasis-node/cmd/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,18 +607,14 @@ func doCheckGenesis(cmd *cobra.Command, args []string) {
logger.Error("failed to open genesis file", "err", err)
os.Exit(1)
}
// NOTE: The genesis document sanity checks are performed inside the
// NewFileProvider() function.
doc, err := provider.GetGenesisDocument()
if err != nil {
logger.Error("failed to get genesis document", "err", err)
os.Exit(1)
}

err = doc.SanityCheck()
if err != nil {
logger.Error("genesis document sanity check failed", "err", err)
os.Exit(1)
}

// Load raw genesis file.
rawFile, err := ioutil.ReadFile(filename)
if err != nil {
Expand Down

0 comments on commit 01e2f71

Please sign in to comment.