-
Notifications
You must be signed in to change notification settings - Fork 118
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
change(rpc): return u64 from get_network_sol_ps
and remove arbitrary_precision
feature from serde
#5829
Conversation
768a463
to
dd272db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good.
as
would be ok in this specific case, but since this module has consensus rules in it, we might want to avoid using it entirely here.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5829 +/- ##
==========================================
- Coverage 78.82% 78.81% -0.01%
==========================================
Files 308 308
Lines 38742 38742
==========================================
- Hits 30539 30536 -3
- Misses 8203 8206 +3 |
Co-authored-by: teor <teor@riseup.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Does this also need a Cargo.lock update?
(CI will check that for us.)
Oh, sorry about the rustfmt in my suggestion. |
Nope, it probably doesn't condition any dependencies on it.
No worries, thank you for the note and for the quick review. |
Motivation
Mining RPCs responding with the network solution rate added in #5808 are returning a
u128
, requiring thearbitrary_precision
feature fromserde
.There are issues open in
serde
about thearbitrary_precision
feature (see serde-rs/json#505 and serde-rs/serde#1183). We haven't run into these issues but we only needu64
for any feasible solution rate that might be returned anyways, so we should use au64
instead of au128
.Solution
solution_rate
to au64
getnetworksolps
,getnetworkhashps
, andgetmininginfo
Review
Anyone can review.
Reviewer Checklist