makeNodeInfo returns error (#3029)

* makeNodeInfo returns error

* version and changelog
This commit is contained in:
Ethan Buchman 2018-12-16 14:05:58 -05:00 committed by GitHub
parent 9a6dd96cba
commit b3141d7d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 22 deletions

View File

@ -1,5 +1,17 @@
# Changelog # Changelog
## v0.27.2
*December 16th, 2018*
### IMPROVEMENTS:
- [node] [\#3025](https://github.com/tendermint/tendermint/issues/3025) Validate NodeInfo addresses on startup.
### BUG FIXES:
- [p2p] [\#3025](https://github.com/tendermint/tendermint/pull/3025) Revert to using defers in addrbook. Fixes deadlocks in pex and consensus upon invalid ExternalAddr/ListenAddr configuration.
## v0.27.1 ## v0.27.1
*December 15th, 2018* *December 15th, 2018*

View File

@ -1,4 +1,4 @@
## v0.27.2 ## v0.27.3
*TBD* *TBD*
@ -22,4 +22,3 @@ Special thanks to external contributors on this release:
### BUG FIXES: ### BUG FIXES:
- [\#3025](https://github.com/tendermint/tendermint/pull/3025) - Revert to using defers in addrbook. Fixes deadlocks in pex and consensus upon invalid ExternalAddr/ListenAddr configuration.

View File

@ -348,9 +348,8 @@ func NewNode(config *cfg.Config,
indexerService := txindex.NewIndexerService(txIndexer, eventBus) indexerService := txindex.NewIndexerService(txIndexer, eventBus)
indexerService.SetLogger(logger.With("module", "txindex")) indexerService.SetLogger(logger.With("module", "txindex"))
var ( p2pLogger := logger.With("module", "p2p")
p2pLogger = logger.With("module", "p2p") nodeInfo, err := makeNodeInfo(
nodeInfo = makeNodeInfo(
config, config,
nodeKey.ID(), nodeKey.ID(),
txIndexer, txIndexer,
@ -361,7 +360,9 @@ func NewNode(config *cfg.Config,
state.Version.Consensus.App, state.Version.Consensus.App,
), ),
) )
) if err != nil {
return nil, err
}
// Setup Transport. // Setup Transport.
var ( var (
@ -782,7 +783,7 @@ func makeNodeInfo(
txIndexer txindex.TxIndexer, txIndexer txindex.TxIndexer,
chainID string, chainID string,
protocolVersion p2p.ProtocolVersion, protocolVersion p2p.ProtocolVersion,
) p2p.NodeInfo { ) (p2p.NodeInfo, error) {
txIndexerStatus := "on" txIndexerStatus := "on"
if _, ok := txIndexer.(*null.TxIndex); ok { if _, ok := txIndexer.(*null.TxIndex); ok {
txIndexerStatus = "off" txIndexerStatus = "off"
@ -818,11 +819,7 @@ func makeNodeInfo(
nodeInfo.ListenAddr = lAddr nodeInfo.ListenAddr = lAddr
err := nodeInfo.Validate() err := nodeInfo.Validate()
if err != nil { return nodeInfo, err
panic(err)
}
return nodeInfo
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@ -18,7 +18,7 @@ const (
// TMCoreSemVer is the current version of Tendermint Core. // TMCoreSemVer is the current version of Tendermint Core.
// It's the Semantic Version of the software. // It's the Semantic Version of the software.
// Must be a string because scripts like dist.sh read this file. // Must be a string because scripts like dist.sh read this file.
TMCoreSemVer = "0.27.1" TMCoreSemVer = "0.27.2"
// ABCISemVer is the semantic version of the ABCI library // ABCISemVer is the semantic version of the ABCI library
ABCISemVer = "0.15.0" ABCISemVer = "0.15.0"