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/stream.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/stream.go')
-rw-r--r-- | swarm/network/stream/stream.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swarm/network/stream/stream.go b/swarm/network/stream/stream.go index 319fc62c9..6dcf31165 100644 --- a/swarm/network/stream/stream.go +++ b/swarm/network/stream/stream.go @@ -60,6 +60,7 @@ type Registry struct { delivery *Delivery intervalsStore state.Store doRetrieve bool + maxPeerServers int } // RegistryOptions holds optional values for NewRegistry constructor. @@ -68,6 +69,7 @@ type RegistryOptions struct { DoSync bool DoRetrieve bool SyncUpdateDelay time.Duration + MaxPeerServers int // The limit of servers for each peer in registry } // NewRegistry is Streamer constructor @@ -87,6 +89,7 @@ func NewRegistry(addr *network.BzzAddr, delivery *Delivery, syncChunkStore stora delivery: delivery, intervalsStore: intervalsStore, doRetrieve: options.DoRetrieve, + maxPeerServers: options.MaxPeerServers, } streamer.api = NewAPI(streamer) delivery.getPeer = streamer.getPeer |