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

Refactor remove unnecessary rounding #34963

Closed

Conversation

tao-stones
Copy link
Contributor

@tao-stones tao-stones commented Jan 25, 2024

Problem

A call to round() was left behind after removing congestion_multipler.

Summary of Changes

  • remove it.
  • rename an unused parameter

Fixes #

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (5da06c5) 81.6% compared to head (e07797c) 81.6%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34963   +/-   ##
=======================================
  Coverage    81.6%    81.6%           
=======================================
  Files         830      830           
  Lines      224746   224757   +11     
=======================================
+ Hits       183512   183533   +21     
+ Misses      41234    41224   -10     

@tao-stones tao-stones marked this pull request as ready for review January 26, 2024 14:28
.saturating_add(write_lock_fee)
.saturating_add(compute_fee) as f64)
.round() as u64,
.saturating_add(compute_fee),
Copy link
Contributor

Choose a reason for hiding this comment

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

needs a feature-gate 😢 f64 rounding could lead to a different result here if total fee is high....I think that this probably would not happen practically

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess safe to 2^53...so practically is this okay?

@tao-stones
Copy link
Contributor Author

Close it for now, issue ##34982 tracks it.

Removing round() needs a feature gate, which requires an additional parameter to calculate_fee() which is an exposed public api, making it a "breaking" change.

@tao-stones tao-stones closed this Jan 27, 2024
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.

None yet

2 participants