|
|
@ -136,7 +136,7 @@ func extractKey(tmhome, outputPath string) { |
|
|
|
stateFile := filepath.Join(internal.ExpandPath(tmhome), "data", "priv_validator_state.json") |
|
|
|
fpv := privval.LoadFilePV(keyFile, stateFile) |
|
|
|
pkb := [64]byte(fpv.Key.PrivKey.(ed25519.PrivKeyEd25519)) |
|
|
|
if err := ioutil.WriteFile(internal.ExpandPath(outputPath), pkb[:32], 0644); err != nil { |
|
|
|
if err := ioutil.WriteFile(internal.ExpandPath(outputPath), pkb[:32], 0600); err != nil { |
|
|
|
logger.Info("Failed to write private key", "output", outputPath, "err", err) |
|
|
|
os.Exit(1) |
|
|
|
} |
|
|
|