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

@@ -1,3 +1,15 @@
#!/bin/sh
#
# Invoke Mockery v2 to update generated mocks for the given type.
#
# This script runs a locally-installed "mockery" if available, otherwise it
# runs the published Docker container. This legerdemain is so that the CI build
# and a local build can work off the same script.
#
if ! which mockery ; then
mockery() {
docker run --rm -v "$PWD":/w --workdir=/w vektra/mockery:v2.12.3
}
fi
go run github.com/vektra/mockery/v2 --disable-version-string --case underscore --name $*
mockery --disable-version-string --case underscore --name "$@"