-
Notifications
You must be signed in to change notification settings - Fork 608
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
Make accumulator objects more consistently pointers throughout #5848
Conversation
@@ -426,14 +426,15 @@ func (accum AccumulatorObject) ClaimRewards(positionName string) (sdk.Coins, sdk | |||
|
|||
// GetTotalShares returns the total number of shares in the accumulator | |||
func (accum AccumulatorObject) GetTotalShares() (sdk.Dec, error) { | |||
accum, err := GetAccumulator(accum.store, accum.name) | |||
return accum.totalShares, err | |||
// TODO: Make this not do an extra get. |
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.
This TODO is the only new line introduced by this PR :)
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.
Sweet
One question - In the PR description it says:
"State compatible component of removing some unneeded store re-gets!"
I didn't notice any removals. Just confirming - are these going to be added in a subsequent PR?
Yes, one is in #5849 ! |
* Make accumulator objects more consistently pointers throughout * Update go mod (cherry picked from commit 04596ca) # Conflicts: # go.mod # go.sum
…ort #5848) (#5865) * Make accumulator objects more consistently pointers throughout (#5848) * Make accumulator objects more consistently pointers throughout * Update go mod (cherry picked from commit 04596ca) # Conflicts: # go.mod # go.sum * fix imports --------- Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: Dev Ojha <[email protected]>
Component of #5845
State compatible component of removing some unneeded store re-gets!
After this, we should be able to then remove some unneeded re-gets for accumulators :)
No new tests, safety of this should be covered by existing tests + resyncing on mainnet.