mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
Refactoring genesis, including PubKey into TxInput
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/state"
|
||||
@@ -10,14 +9,15 @@ import (
|
||||
|
||||
func gen_validator() {
|
||||
|
||||
// If already exists, bail out.
|
||||
filename := config.PrivValidatorFile()
|
||||
if _, err := os.Stat(filename); !os.IsNotExist(err) {
|
||||
fmt.Printf("Cannot generate new validator, file already exists at %v\n", filename)
|
||||
}
|
||||
|
||||
// Generate private validator
|
||||
privValidator := state.GenPrivValidator()
|
||||
privValidator.Save()
|
||||
fmt.Printf("Generated a new validator at %v\n", filename)
|
||||
privValidatorJSONBytes := privValidator.JSONBytes()
|
||||
fmt.Printf(`Generated a new validator!
|
||||
Paste the following JSON into your %v file
|
||||
|
||||
%v
|
||||
|
||||
`,
|
||||
config.PrivValidatorFile(),
|
||||
string(privValidatorJSONBytes),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user