Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

fix: unset the default value of totallimit #1121

Merged
merged 1 commit into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/dfget/app/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion dfget/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func NewProperties() *Properties {
LocalLimit: DefaultLocalLimit,
MinRate: DefaultMinRate,
ClientQueueSize: DefaultClientQueueSize,
TotalLimit: DefaultTotalLimit,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then could you please delete the const value DefaultTotalLimit?

}
}

Expand Down
1 change: 0 additions & 1 deletion dfget/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down