p2p: set empty timeouts to configed values. (manual backport of #8847) (#8869)

* regenerate mocks using newer style

* p2p: set empty timeouts to small values. (#8847)

These timeouts default to 'do not time out' if they are not set. This times up resources, potentially indefinitely. If node on the other side of the the handshake is up but unresponsive, the[ handshake call](edec79448a/internal/p2p/router.go (L720)) will _never_ return.

* fix light client select statement
This commit is contained in:
William Banfield
2022-06-28 16:07:15 -04:00
committed by William Banfield
parent 9daea43375
commit af9bca5013
31 changed files with 354 additions and 51 deletions

View File

@@ -1246,7 +1246,9 @@ func createAndStartPrivValidatorGRPCClient(
func getRouterConfig(conf *config.Config, proxyApp proxy.AppConns) p2p.RouterOptions {
opts := p2p.RouterOptions{
QueueType: conf.P2P.QueueType,
QueueType: conf.P2P.QueueType,
HandshakeTimeout: conf.P2P.HandshakeTimeout,
DialTimeout: conf.P2P.DialTimeout,
}
if conf.P2P.MaxNumInboundPeers > 0 {