Browse Source

node: clarify unneccessary logic in seed constructor (#7818)

pull/7839/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
e0d44a650e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 9 deletions
  1. +7
    -9
      node/setup.go

+ 7
- 9
node/setup.go View File

@ -484,21 +484,19 @@ func makeSeedNodeInfo(
Block: state.Version.Consensus.Block, Block: state.Version.Consensus.Block,
App: state.Version.Consensus.App, App: state.Version.Consensus.App,
}, },
NodeID: nodeKey.ID,
Network: genDoc.ChainID,
Version: version.TMVersion,
Channels: []byte{},
Moniker: cfg.Moniker,
NodeID: nodeKey.ID,
Network: genDoc.ChainID,
Version: version.TMVersion,
Channels: []byte{
pex.PexChannel,
},
Moniker: cfg.Moniker,
Other: types.NodeInfoOther{ Other: types.NodeInfoOther{
TxIndex: "off", TxIndex: "off",
RPCAddress: cfg.RPC.ListenAddress, RPCAddress: cfg.RPC.ListenAddress,
}, },
} }
if cfg.P2P.PexReactor {
nodeInfo.Channels = append(nodeInfo.Channels, pex.PexChannel)
}
nodeInfo.ListenAddr = cfg.P2P.ExternalAddress nodeInfo.ListenAddr = cfg.P2P.ExternalAddress
if nodeInfo.ListenAddr == "" { if nodeInfo.ListenAddr == "" {
nodeInfo.ListenAddr = cfg.P2P.ListenAddress nodeInfo.ListenAddr = cfg.P2P.ListenAddress


Loading…
Cancel
Save