diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bcbedca0..4f1fc9c7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/x/genutil/utils.go b/x/genutil/utils.go index 7d1a761ef..3d8aa8f2e 100644 --- a/x/genutil/utils.go +++ b/x/genutil/utils.go @@ -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()