-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fixed staking processors for the API routes #3024
Conversation
val := &api.DirectStakedValue{ | ||
Address: dslp.publicKeyConverter.Encode(leafKey), | ||
Staked: totalStakedCurrentAccount.String(), | ||
Staked: staked.String(), |
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.
The separation into Staked and Total is misleading, as topup is also staked.
Can the field "staked" be renamed into base stake?
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.
done
Codecov Report
@@ Coverage Diff @@
## master #3024 +/- ##
=======================================
Coverage 75.08% 75.08%
=======================================
Files 629 629
Lines 60826 60831 +5
=======================================
+ Hits 45670 45675 +5
Misses 11039 11039
Partials 4117 4117
Continue to review full report at Codecov.
|
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.
System test passed.
Testing scenario: do a top-up stake on an existing node. The routes:
/network/economics
should return theerd_total_base_staked_value
value as a multiple of 2500 anderd_total_top_up_value
the exact top-up-ed value. Next, the/network/direct-staked-info
should return the correct value for that top-up-ed address (theBaseStaked
should be a 2500 multiple, theTopUp
should contain the top up value and theTotal
should be BaseStaked + TopUp)