ADR-016: Add protocol Version to NodeInfo (#2654)

* p2p: add protocol Version to NodeInfo

* update node pkg. remove extraneous version files

* update changelog and docs

* fix test

* p2p: Version -> ProtocolVersion; more ValidateBasic and tests
This commit is contained in:
Ethan Buchman
2018-10-18 10:29:59 -04:00
committed by GitHub
parent 455d34134c
commit 14c1baeb24
13 changed files with 246 additions and 129 deletions

View File

@ -32,7 +32,6 @@ import (
rpccore "github.com/tendermint/tendermint/rpc/core"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
grpccore "github.com/tendermint/tendermint/rpc/grpc"
"github.com/tendermint/tendermint/rpc/lib"
"github.com/tendermint/tendermint/rpc/lib/server"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/state/txindex"
@ -771,9 +770,10 @@ func makeNodeInfo(
txIndexerStatus = "off"
}
nodeInfo := p2p.DefaultNodeInfo{
ID_: nodeID,
Network: chainID,
Version: version.Version,
ProtocolVersion: p2p.InitProtocolVersion,
ID_: nodeID,
Network: chainID,
Version: version.TMCoreSemVer,
Channels: []byte{
bc.BlockchainChannel,
cs.StateChannel, cs.DataChannel, cs.VoteChannel, cs.VoteSetBitsChannel,
@ -782,12 +782,8 @@ func makeNodeInfo(
},
Moniker: config.Moniker,
Other: p2p.DefaultNodeInfoOther{
AminoVersion: amino.Version,
P2PVersion: p2p.Version,
ConsensusVersion: cs.Version,
RPCVersion: fmt.Sprintf("%v/%v", rpc.Version, rpccore.Version),
TxIndex: txIndexerStatus,
RPCAddress: config.RPC.ListenAddress,
TxIndex: txIndexerStatus,
RPCAddress: config.RPC.ListenAddress,
},
}