-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
staking tests #754
staking tests #754
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #754 +/- ##
===========================================
+ Coverage 59.52% 63.28% +3.75%
===========================================
Files 62 62
Lines 3274 3315 +41
===========================================
+ Hits 1949 2098 +149
+ Misses 1181 1069 -112
- Partials 144 148 +4 |
x/stake/handler.go
Outdated
@@ -187,8 +176,12 @@ func BondCoins(ctx sdk.Context, k Keeper, bond DelegatorBond, candidate Candidat | |||
if err != nil { | |||
return err | |||
} | |||
newShares := k.candidateAddTokens(ctx, candidate, amount.Amount) | |||
p := k.GetPool(ctx) | |||
var newShares sdk.Rat |
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.
nit: := is probably cleaner here
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.
oh okay yeah can do that here actually. 👍
// load/save the pool | ||
func (k Keeper) GetPool(ctx sdk.Context) (gs Pool) { | ||
// check if cached before anything | ||
if k.gs != (Pool{}) { |
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.
Is a layer of caching on top of the multistore necessary?
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 is based off of conversation with jae/sunny in berlin... if retrieving multiple times why unmarshal multiple times
in progress in progress
in progress in progress done
f1ebd67
to
7d67d00
Compare
closes: #571 |
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.
Didn't actually review, testing for @rigelrozanski
cool thanks |
tick tests / pool tests / keeper tests
closes #735
closes #731
closes #732
closes #571