From c10fde1b6622137c1eabe41a611cee5fcb19a2aa Mon Sep 17 00:00:00 2001 From: lowzj Date: Wed, 4 Dec 2019 15:36:34 +0800 Subject: [PATCH] fix: unset the default value of totallimit Signed-off-by: lowzj --- cmd/dfget/app/root_test.go | 2 +- dfget/config/config.go | 1 - dfget/config/constants.go | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/dfget/app/root_test.go b/cmd/dfget/app/root_test.go index 5cad19ce1..c4348aa89 100644 --- a/cmd/dfget/app/root_test.go +++ b/cmd/dfget/app/root_test.go @@ -39,7 +39,7 @@ func (suit *dfgetSuit) Test_initFlagsNoArguments() { initProperties() suit.Equal(cfg.Nodes, []string{"127.0.0.1:8002"}) suit.Equal(cfg.LocalLimit, 20*rate.MB) - suit.Equal(cfg.TotalLimit, 20*rate.MB) + suit.Equal(cfg.TotalLimit, rate.Rate(0)) suit.Equal(cfg.Notbs, false) suit.Equal(cfg.DFDaemon, false) suit.Equal(cfg.Console, false) diff --git a/dfget/config/config.go b/dfget/config/config.go index 73d35f41e..deec037d4 100644 --- a/dfget/config/config.go +++ b/dfget/config/config.go @@ -96,7 +96,6 @@ func NewProperties() *Properties { LocalLimit: DefaultLocalLimit, MinRate: DefaultMinRate, ClientQueueSize: DefaultClientQueueSize, - TotalLimit: DefaultTotalLimit, } } diff --git a/dfget/config/constants.go b/dfget/config/constants.go index 7d0a1910b..a12e0a5fb 100644 --- a/dfget/config/constants.go +++ b/dfget/config/constants.go @@ -52,7 +52,6 @@ const ( DefaultNode = "127.0.0.1" DefaultLocalLimit = 20 * rate.MB DefaultMinRate = 64 * rate.KB - DefaultTotalLimit = 20 * rate.MB DefaultClientQueueSize = 6 DefaultSupernodeWeight = 1 )