Browse Source

activate PEX reactor by default

pull/958/head
Ethan Buchman 7 years ago
committed by Anton Kaliaev
parent
commit
462b755a60
No known key found for this signature in database GPG Key ID: 7B6881D965918214
3 changed files with 3 additions and 2 deletions
  1. +1
    -1
      cmd/tendermint/commands/run_node.go
  2. +1
    -0
      config/config.go
  3. +1
    -1
      p2p/pex_reactor.go

+ 1
- 1
cmd/tendermint/commands/run_node.go View File

@ -30,7 +30,7 @@ func AddNodeFlags(cmd *cobra.Command) {
cmd.Flags().String("p2p.laddr", config.P2P.ListenAddress, "Node listen address. (0.0.0.0:0 means any interface, any port)")
cmd.Flags().String("p2p.seeds", config.P2P.Seeds, "Comma delimited host:port seed nodes")
cmd.Flags().Bool("p2p.skip_upnp", config.P2P.SkipUPNP, "Skip UPNP configuration")
cmd.Flags().Bool("p2p.pex", config.P2P.PexReactor, "Enable Peer-Exchange (dev feature)")
cmd.Flags().Bool("p2p.pex", config.P2P.PexReactor, "Enable/disable Peer-Exchange")
// consensus flags
cmd.Flags().Bool("consensus.create_empty_blocks", config.Consensus.CreateEmptyBlocks, "Set this to false to only produce blocks when there are txs or when the AppHash changes")


+ 1
- 0
config/config.go View File

@ -244,6 +244,7 @@ func DefaultP2PConfig() *P2PConfig {
MaxMsgPacketPayloadSize: 1024, // 1 kB
SendRate: 512000, // 500 kB/s
RecvRate: 512000, // 500 kB/s
PexReactor: true,
}
}


+ 1
- 1
p2p/pex_reactor.go View File

@ -144,7 +144,7 @@ func (r *PEXReactor) Receive(chID byte, src Peer, msgBytes []byte) {
r.Logger.Error("Error decoding message", "err", err)
return
}
r.Logger.Info("Received message", "msg", msg)
r.Logger.Debug("Received message", "src", src, "chId", chID, "msg", msg)
switch msg := msg.(type) {
case *pexRequestMessage:


Loading…
Cancel
Save