From e8507b75be87036a8b85ee7939482dfb6fadafc1 Mon Sep 17 00:00:00 2001 From: Benjamin Bollen <ben@erisindustries.com> Date: Tue, 5 Jul 2016 13:40:59 +0200 Subject: [PATCH] Fix bug: failure to load Tendermint configuration file; error was silently ignored improve error line --- consensus/tendermint/tendermint.go | 2 +- core/core.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/consensus/tendermint/tendermint.go b/consensus/tendermint/tendermint.go index e89bf3c1..c87719e5 100644 --- a/consensus/tendermint/tendermint.go +++ b/consensus/tendermint/tendermint.go @@ -62,7 +62,7 @@ func NewTendermintNode(moduleConfig *config.ModuleConfig, // to be written in tendermint's root directory. // NOTE: [ben] as elsewhere Sub panics if config file does not have this // subtree. To shield in go-routine, or PR to viper. - if !moduleConfig.Config.IsSet("confighuration") { + if !moduleConfig.Config.IsSet("configuration") { return nil, fmt.Errorf("Failed to extract Tendermint configuration subtree.") } tendermintConfigViper := moduleConfig.Config.Sub("configuration") diff --git a/core/core.go b/core/core.go index 43b54402..ae02d5b7 100644 --- a/core/core.go +++ b/core/core.go @@ -58,7 +58,9 @@ func NewCore(chainId string, consensusConfig *config.ModuleConfig, } log.Debug("Loaded pipe with application manager") // pass the consensus engine into the pipe - consensus.LoadConsensusEngineInPipe(consensusConfig, pipe) + if e := consensus.LoadConsensusEngineInPipe(consensusConfig, pipe); e != nil { + return nil, fmt.Errorf("Failed to load consensus engine in pipe: %v", e) + } tendermintPipe, err := pipe.GetTendermintPipe() if err != nil { log.Warn(fmt.Sprintf("Tendermint gateway not supported by %s", -- GitLab