Closed cyborgshead closed 3 years ago
@litvintech Would you like to create a PR with a test?
Continuous and delayed accounts do track delegations and undelegations. I cannot speak for periodic account types because that was an external contribution.
Thank you very much for taking the time to file this issue and contribute to making Cosmos SDK better.
@litvintech dixit:
Looking to the code, there is not SetAccount here
True that, and yet addCoins()
is called here:
addCoins()
subsequently calls setBalance()
:
Which in turn sets the new balance for the account:
@litvintech can you write a test case, please? Meanwhile, I'm labeling this accordingly.
Continuous and delayed accounts do track delegations and undelegations. I cannot speak for periodic account types because that was an external contribution.
Haven't used v0.41, but PeriodVestingAccount
delegation tracking works on v0.39 and it looks to me like it should track delegations as normal here:
https://github.com/cosmos/cosmos-sdk/blob/4b4768d242b2ae12cbd9fee8b1e8e4063767abe0/x/bank/keeper/keeper.go#L117
Summary of Bug
Delegation (and undelegation) from vesting account are not tracked. I tried to make delegation from account (in my case periodic vesting account) and found that there are no updates to delegated vesting amount. Looking to the code, there is not SetAccount here
Note: it was worked in 0.39.0
Version
SDK 0.41.0
Steps to Reproduce
For Admin Use