Undelegate may lose the delegator’s tokens when exceed the MaxEntries of unbonding delegations #4551
Labels
C:x/staking
Type: Code Hygiene
General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Summary of Bug
Undelegate may lose the delegator’s tokens when exceed the MaxEntries of unbonding delegations
Version
$ git log -1
commit 95f3d32 (HEAD -> master, origin/master, origin/HEAD)
Author: colin axner colinaxner@berkeley.edu
Date: Thu Jun 13 06:54:17 2019 -0700
Steps to Reproduce
Suppose the
MaxEntries
of unbonding delegations is 7. When delegator perform the eighth undelegate, theUndelegate
will deduct the shares in thetypes.Delegation
, but not put theredelegation
in theUBDQueue
, which will cause the reduce of the delegator shares, and the corresponding account balance will not receive the reduced token, SupplementingTestUnbondingDelegationsMaxEntries
with delegation and account balance check can be exposed to this problemFor Admin Use
The text was updated successfully, but these errors were encountered: