fixed score reset logic in the pse module#48
Conversation
ysv
left a comment
There was a problem hiding this comment.
@ysv reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @miladz68, and @TxCorpi0x)
x/pse/keeper/score_map.go line 143 at r1 (raw file):
} } return allDelegationTimeEntry, nil
nit: Entry -> Entries ?
TxCorpi0x
left a comment
There was a problem hiding this comment.
@TxCorpi0x reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @masihyeganeh and @miladz68)
x/pse/keeper/distribute.go line 30 at r1 (raw file):
} allDelegationTimeEntries, err := finalScoreMap.iterateDelegationTimeEntries(ctx, k)
Can we use iterator func and do k.DelegationTimeEntries.Set(ctx, kv.Key, kv.Value)in the loop instead of getting all of the entries all at once and do the changes in a separate loop?
miladz68
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @TxCorpi0x)
x/pse/keeper/distribute.go line 30 at r1 (raw file):
Previously, TxCorpi0x wrote…
Can we use iterator func and do
k.DelegationTimeEntries.Set(ctx, kv.Key, kv.Value)in the loop instead of getting all of the entries all at once and do the changes in a separate loop?
no, writes are not allowed while iterator is open.
TxCorpi0x
left a comment
There was a problem hiding this comment.
@TxCorpi0x reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh)
ysv
left a comment
There was a problem hiding this comment.
@ysv reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh)
Description
Reviewers checklist:
Authors checklist
This change is