Browse Source

makeNodeInfo returns error (#3029)

* makeNodeInfo returns error

* version and changelog
pull/3030/head
Ethan Buchman 6 years ago
committed by GitHub
parent
commit
b3141d7d02
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 22 deletions
  1. +12
    -0
      CHANGELOG.md
  2. +1
    -2
      CHANGELOG_PENDING.md
  3. +16
    -19
      node/node.go
  4. +1
    -1
      version/version.go

+ 12
- 0
CHANGELOG.md View File

@ -1,5 +1,17 @@
# 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
*December 15th, 2018*


+ 1
- 2
CHANGELOG_PENDING.md View File

@ -1,4 +1,4 @@
## v0.27.2
## v0.27.3
*TBD*
@ -22,4 +22,3 @@ Special thanks to external contributors on this release:
### 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.

+ 16
- 19
node/node.go View File

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


+ 1
- 1
version/version.go View File

@ -18,7 +18,7 @@ const (
// TMCoreSemVer is the current version of Tendermint Core.
// It's the Semantic Version of the software.
// 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 = "0.15.0"


Loading…
Cancel
Save