diff options
author | Janos Guljas <janos@resenje.org> | 2018-09-24 23:40:22 +0800 |
---|---|---|
committer | Janos Guljas <janos@resenje.org> | 2018-09-24 23:56:00 +0800 |
commit | 9e99a0c2b94daa351325688702e2a49e34f60dbf (patch) | |
tree | a66c070a9c55eff5dda766cb35b013657eab37df /swarm/network/stream/common_test.go | |
parent | 1f45ba9bb1c19489a6c8bf9caf100e56dcb79788 (diff) | |
download | dexon-9e99a0c2b94daa351325688702e2a49e34f60dbf.tar dexon-9e99a0c2b94daa351325688702e2a49e34f60dbf.tar.gz dexon-9e99a0c2b94daa351325688702e2a49e34f60dbf.tar.bz2 dexon-9e99a0c2b94daa351325688702e2a49e34f60dbf.tar.lz dexon-9e99a0c2b94daa351325688702e2a49e34f60dbf.tar.xz dexon-9e99a0c2b94daa351325688702e2a49e34f60dbf.tar.zst dexon-9e99a0c2b94daa351325688702e2a49e34f60dbf.zip |
cmd/swarm, swarm: add stream peer servers limit
Diffstat (limited to 'swarm/network/stream/common_test.go')
-rw-r--r-- | swarm/network/stream/common_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/swarm/network/stream/common_test.go b/swarm/network/stream/common_test.go index e0d776e34..24de51158 100644 --- a/swarm/network/stream/common_test.go +++ b/swarm/network/stream/common_test.go @@ -84,7 +84,7 @@ func createGlobalStore() (string, *mockdb.GlobalStore, error) { return globalStoreDir, globalStore, nil } -func newStreamerTester(t *testing.T) (*p2ptest.ProtocolTester, *Registry, *storage.LocalStore, func(), error) { +func newStreamerTester(t *testing.T, registryOptions *RegistryOptions) (*p2ptest.ProtocolTester, *Registry, *storage.LocalStore, func(), error) { // setup addr := network.RandomAddr() // tested peers peer address to := network.NewKademlia(addr.OAddr, network.NewKadParams()) @@ -114,7 +114,7 @@ func newStreamerTester(t *testing.T) (*p2ptest.ProtocolTester, *Registry, *stora delivery := NewDelivery(to, netStore) netStore.NewNetFetcherFunc = network.NewFetcherFactory(delivery.RequestFromPeers, true).New - streamer := NewRegistry(addr, delivery, netStore, state.NewInmemoryStore(), nil) + streamer := NewRegistry(addr, delivery, netStore, state.NewInmemoryStore(), registryOptions) teardown := func() { streamer.Close() removeDataDir() |