diff options
author | Viktor TrĂ³n <viktor.tron@gmail.com> | 2018-09-28 17:04:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-28 17:04:07 +0800 |
commit | 0da3b17a112a75b54c8b3e5a2bf65a27a1c8c999 (patch) | |
tree | a8ff65462707ec59c340a93b0a456657b2ab46d6 /swarm/api | |
parent | d8d86692716158f9d514dcaa06b69f129d43c3d8 (diff) | |
parent | 86f68cf04f5166848fd44150363866d7faa72b60 (diff) | |
download | dexon-0da3b17a112a75b54c8b3e5a2bf65a27a1c8c999.tar dexon-0da3b17a112a75b54c8b3e5a2bf65a27a1c8c999.tar.gz dexon-0da3b17a112a75b54c8b3e5a2bf65a27a1c8c999.tar.bz2 dexon-0da3b17a112a75b54c8b3e5a2bf65a27a1c8c999.tar.lz dexon-0da3b17a112a75b54c8b3e5a2bf65a27a1c8c999.tar.xz dexon-0da3b17a112a75b54c8b3e5a2bf65a27a1c8c999.tar.zst dexon-0da3b17a112a75b54c8b3e5a2bf65a27a1c8c999.zip |
Merge pull request #17747 from ethersphere/max-stream-peer-servers
Add stream peer servers limit
Diffstat (limited to 'swarm/api')
-rw-r--r-- | swarm/api/config.go | 70 |
1 files changed, 36 insertions, 34 deletions
diff --git a/swarm/api/config.go b/swarm/api/config.go index e753890e4..be7385408 100644 --- a/swarm/api/config.go +++ b/swarm/api/config.go @@ -50,26 +50,27 @@ type Config struct { Swap *swap.LocalProfile Pss *pss.PssParams //*network.SyncParams - Contract common.Address - EnsRoot common.Address - EnsAPIs []string - Path string - ListenAddr string - Port string - PublicKey string - BzzKey string - NodeID string - NetworkID uint64 - SwapEnabled bool - SyncEnabled bool - SyncingSkipCheck bool - DeliverySkipCheck bool - LightNodeEnabled bool - SyncUpdateDelay time.Duration - SwapAPI string - Cors string - BzzAccount string - privateKey *ecdsa.PrivateKey + Contract common.Address + EnsRoot common.Address + EnsAPIs []string + Path string + ListenAddr string + Port string + PublicKey string + BzzKey string + NodeID string + NetworkID uint64 + SwapEnabled bool + SyncEnabled bool + SyncingSkipCheck bool + DeliverySkipCheck bool + MaxStreamPeerServers int + LightNodeEnabled bool + SyncUpdateDelay time.Duration + SwapAPI string + Cors string + BzzAccount string + privateKey *ecdsa.PrivateKey } //create a default config with all parameters to set to defaults @@ -80,20 +81,21 @@ func NewConfig() (c *Config) { FileStoreParams: storage.NewFileStoreParams(), HiveParams: network.NewHiveParams(), //SyncParams: network.NewDefaultSyncParams(), - Swap: swap.NewDefaultSwapParams(), - Pss: pss.NewPssParams(), - ListenAddr: DefaultHTTPListenAddr, - Port: DefaultHTTPPort, - Path: node.DefaultDataDir(), - EnsAPIs: nil, - EnsRoot: ens.TestNetAddress, - NetworkID: network.DefaultNetworkID, - SwapEnabled: false, - SyncEnabled: true, - SyncingSkipCheck: false, - DeliverySkipCheck: true, - SyncUpdateDelay: 15 * time.Second, - SwapAPI: "", + Swap: swap.NewDefaultSwapParams(), + Pss: pss.NewPssParams(), + ListenAddr: DefaultHTTPListenAddr, + Port: DefaultHTTPPort, + Path: node.DefaultDataDir(), + EnsAPIs: nil, + EnsRoot: ens.TestNetAddress, + NetworkID: network.DefaultNetworkID, + SwapEnabled: false, + SyncEnabled: true, + SyncingSkipCheck: false, + MaxStreamPeerServers: 10000, + DeliverySkipCheck: true, + SyncUpdateDelay: 15 * time.Second, + SwapAPI: "", } return |