-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor(x/staking): Migrate UnbondingDelegation to collections #17270
Conversation
…ita/ubdDel-coll
…ita/ubdDel-coll
…ita/ubdDel-coll
…ita/ubdDel-coll
…ita/ubdDel-coll
…ita/ubdDel-coll
…ita/ubdDel-coll
This migration doesn't seem complete as BTW here's the diff test for this (add func (s *KeeperTestSuite) TestDiffCollsMigration() {
s.SetupTest()
delAddrs, valAddrs := createValAddrs(100)
err := sdktestutil.DiffCollectionsMigration(
s.ctx,
s.key,
100,
func(i int64) {
ubd := stakingtypes.UnbondingDelegation{
DelegatorAddress: delAddrs[i].String(),
ValidatorAddress: valAddrs[i].String(),
Entries: []stakingtypes.UnbondingDelegationEntry{
{
CreationHeight: i,
CompletionTime: time.Unix(i, 0).UTC(),
Balance: math.NewInt(i),
UnbondingId: uint64(i),
},
},
}
err := s.stakingKeeper.SetUnbondingDelegation(s.ctx, ubd)
s.Require().NoError(err)
},
"d03ca412f3f6849b5148a2ca49ac2555f65f90b7fab6a289575ed337f15c0f4b",
)
s.Require().NoError(err)
} |
…ita/ubdDel-coll
…ita/ubdDel-coll
…ita/ubdDel-coll
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.
few places the global bech32 is being used, can we revert this to the address codec
…ita/ubdDel-coll
…ita/ubdDel-coll
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.
overall lgtm
…ita/ubdDel-coll
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.
lgtm
Description
Closes: #16381
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change