You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/quicksilverd: AddGenesisAccountCmd has a redundant condition checking if a balance is zero and if the vesting amount is greater but it really should check that the coalesced vesting amounts are not greater than the coalesced balances in case there are duplicate denomination entries in the coins
#188
Closed
odeke-em opened this issue
Aug 25, 2022
· 1 comment
If we look at this code https://github.com/ingenuity-build/quicksilver/blob/4434d8801040205d86a68a3ca681c69f94ba5815/cmd/quicksilverd/genaccounts.go#L101-L102 really if someone accidentally entered a duplicate denomination entry those checks could fail for example with {500qck, 400qck} for vestingAmount then {600qck} for balance, that check doesn't complain yet technically the total balance is less than the collective vesting amount. Unfortunately the cosmos-sdk's code doesn't support coalescing but we should perhaps apply this coalescing
which will catch those checks after being applied to each sdk.Coins values.
/cc @elias-orijtech
The text was updated successfully, but these errors were encountered: