Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: fix duration parameter types #2194

Merged
merged 1 commit into from
Sep 27, 2021
Merged

config: fix duration parameter types #2194

merged 1 commit into from
Sep 27, 2021

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Sep 25, 2021

These parameters denote seconds and are thus unitless integers, not
durations. Related #2085 .

Signed-off-by: Evgeniy Stratonikov evgeniy@nspcc.ru

These parameters denote seconds and are thus unitless integers, not
durations.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
@codecov
Copy link

codecov bot commented Sep 25, 2021

Codecov Report

Merging #2194 (7fa6c8d) into master (63c939b) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2194      +/-   ##
==========================================
+ Coverage   83.72%   83.76%   +0.03%     
==========================================
  Files         296      296              
  Lines       28319    28319              
==========================================
+ Hits        23711    23722      +11     
+ Misses       3259     3244      -15     
- Partials     1349     1353       +4     
Impacted Files Coverage Δ
pkg/network/server_config.go 100.00% <100.00%> (ø)
pkg/core/native/ledger.go 90.51% <0.00%> (-3.45%) ⬇️
pkg/consensus/consensus.go 72.60% <0.00%> (-0.55%) ⬇️
pkg/network/server.go 72.97% <0.00%> (+0.11%) ⬆️
pkg/services/oracle/request.go 62.50% <0.00%> (+3.26%) ⬆️
pkg/services/oracle/oracle.go 86.48% <0.00%> (+9.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63c939b...7fa6c8d. Read the comment docs.

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

Actually, I very much like time.Duration types in the configuration because they allow to specify 5s or 1m quite naturally. But we had these configurations with implicit seconds for a very long time, so it'd be painful to change them to real time.Duration, so probably this change still makes sense in the end (making current configurations valid).

@fyrchik fyrchik merged commit cfeaeb0 into master Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants