Merge PR #5938: x/genutil: fix InitializeNodeValidatorFiles
This commit is contained in:
parent
5098548b8c
commit
7d6033ea58
|
@ -98,6 +98,7 @@ when method receivers are offline/multisig keys.
|
|||
types (eg. keys) to the `auth` module internal amino codec.
|
||||
* (rest) [\#5906](https://github.com/cosmos/cosmos-sdk/pull/5906) Fix an issue that make some REST calls panic when sending
|
||||
invalid or incomplete requests.
|
||||
* (x/genutil) [\#5938](https://github.com/cosmos/cosmos-sdk/pull/5938) Fix `InitializeNodeValidatorFiles` error handling.
|
||||
|
||||
### State Machine Breaking
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ func InitializeNodeValidatorFiles(config *cfg.Config,
|
|||
|
||||
nodeKey, err := p2p.LoadOrGenNodeKey(config.NodeKeyFile())
|
||||
if err != nil {
|
||||
return nodeID, valPubKey, err
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
nodeID = string(nodeKey.ID())
|
||||
|
@ -60,12 +60,12 @@ func InitializeNodeValidatorFiles(config *cfg.Config,
|
|||
|
||||
pvKeyFile := config.PrivValidatorKeyFile()
|
||||
if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0777); err != nil {
|
||||
return nodeID, valPubKey, nil
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
pvStateFile := config.PrivValidatorStateFile()
|
||||
if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0777); err != nil {
|
||||
return nodeID, valPubKey, nil
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
valPubKey = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile).GetPubKey()
|
||||
|
|
Loading…
Reference in New Issue