integrate address exclusion functionality from distribution#27
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 and @TxCorpi0x)
x/pse/keeper/score_map.go line 50 at r1 (raw file):
return nil } key, err := m.addressCodec.BytesToString(addr)
but shouldn't we skip excluded addresses here also ?
This way they will not be accounted in total score also and as result we will be able to distribute ~100% of allocated tokens.
Because with current implementation significant amount might be left
miladz68
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @TxCorpi0x, and @ysv)
x/pse/keeper/score_map.go line 50 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
but shouldn't we skip excluded addresses here also ?
This way they will not be accounted in total score also and as result we will be able to distribute ~100% of allocated tokens.
Because with current implementation significant amount might be left
we never get this code since it is called in one of the iterations.
ysv
left a comment
There was a problem hiding this comment.
@ysv reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @miladz68, and @TxCorpi0x)
x/pse/keeper/score_map.go line 50 at r1 (raw file):
Previously, miladz68 (milad) wrote…
we never get this code since it is called in one of the iterations.
I see what you mean.
However, it was a bit confusing because AddScore method is public, but it is used by iterateDelegationTimeEntries & iterateAccountScoreSnapshot both of which are private.
maybe we should make addScore private also because otherwise excluded addresses logic might be broken if addScore is called externally
miladz68
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @TxCorpi0x, and @ysv)
x/pse/keeper/score_map.go line 50 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
I see what you mean.
However, it was a bit confusing because AddScore method is public, but it is used byiterateDelegationTimeEntries&iterateAccountScoreSnapshotboth of which are private.maybe we should make addScore private also because otherwise excluded addresses logic might be broken if addScore is called externally
make sense. Done.
TxCorpi0x
left a comment
There was a problem hiding this comment.
@TxCorpi0x reviewed 2 of 2 files at r1, 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @ysv)
ysv
left a comment
There was a problem hiding this comment.
@ysv reviewed 2 of 2 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh)
Description
Reviewers checklist:
Authors checklist
This change is