[#1031] node: Add maxConnPerHost to config

It allows configuring number of neo-go client opened connections per one
host.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-12-15 21:03:06 +03:00 committed by Alex Vanin
parent 90dbf3d944
commit 63e035bd8a
5 changed files with 20 additions and 1 deletions

View file

@ -18,6 +18,7 @@ func TestMorphSection(t *testing.T) {
require.Panics(t, func() { morphconfig.NotificationEndpoint(empty) })
require.Equal(t, morphconfig.DialTimeoutDefault, morphconfig.DialTimeout(empty))
require.Equal(t, false, morphconfig.DisableCache(empty))
require.Equal(t, 10, morphconfig.MaxConnPerHost(empty))
})
const path = "../../../../config/example/node"
@ -39,6 +40,7 @@ func TestMorphSection(t *testing.T) {
require.Equal(t, wss, morphconfig.NotificationEndpoint(c))
require.Equal(t, 30*time.Second, morphconfig.DialTimeout(c))
require.Equal(t, true, morphconfig.DisableCache(c))
require.Equal(t, 11, morphconfig.MaxConnPerHost(c))
}
configtest.ForEachFileType(path, fileConfigTest)