p2p: extend e2e tests for new p2p framework (#6323)

This commit is contained in:
Sam Kleinman
2021-04-08 11:09:21 -04:00
committed by GitHub
parent 0b770870c9
commit 0f41f7465c
13 changed files with 118 additions and 64 deletions
+10
View File
@@ -607,6 +607,15 @@ type P2PConfig struct { //nolint: maligned
// Testing params.
// Force dial to fail
TestDialFail bool `mapstructure:"test-dial-fail"`
// Mostly for testing, use rather than environment variables
// to turn on the new P2P stack.
UseNewP2P bool `mapstructure:"use-new-p2p"`
// Makes it possible to configure which queue backend the p2p
// layer uses. Options are: "fifo", "priority" and "wdrr",
// with the default being "fifo".
QueueType string `mapstructure:"queue-type"`
}
// DefaultP2PConfig returns a default configuration for the peer-to-peer layer
@@ -634,6 +643,7 @@ func DefaultP2PConfig() *P2PConfig {
HandshakeTimeout: 20 * time.Second,
DialTimeout: 3 * time.Second,
TestDialFail: false,
QueueType: "priority",
}
}
+6 -1
View File
@@ -168,7 +168,6 @@ abci = "{{ .BaseConfig.ABCI }}"
# so the app can decide if we should keep the connection or not
filter-peers = {{ .BaseConfig.FilterPeers }}
#######################################################################
### Advanced Configuration Options ###
#######################################################################
@@ -262,6 +261,12 @@ pprof-laddr = "{{ .RPC.PprofListenAddress }}"
#######################################################
[p2p]
# Enable the new p2p layer.
use-new-p2p = {{ .P2P.UseNewP2P }}
# Select the p2p internal queue
queue-type = "{{ .P2P.QueueType }}"
# Address to listen for incoming connections
laddr = "{{ .P2P.ListenAddress }}"