Skip to content
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

fix zero voting power #3220

Closed
wants to merge 2 commits into from
Closed

fix zero voting power #3220

wants to merge 2 commits into from

Commits on Jan 6, 2019

  1. fix zero voting power

    Currently, a.voting_power of users who haven't voted for more than 5 days but had some financial transaction (e.g., claim reward) is set to 0, which no longer represents the voting power at the a.last_vote_time.
    
    This fix returns the previous a.voting power when this reset happens (unless current_mana is 0, case 2 below).
    
    This fix is safe cause vp_t1 = 0 can occur only in the following two cases:
    
    1) 5 days passed
    current voting power (calculated from a.voting_power and a.last_vote_time) will be 100% either way. But this fix is more informative, since it returns the last voting power.
    
    2) vp_t2u = 0
    L2085 return 0 (same as before)
    economicstudio committed Jan 6, 2019
    Configuration menu
    Copy the full SHA
    3ca8b41 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2019

  1. Merge pull request #3218 from economicstudio/fix-zero-voting-power

    fix zero voting power
    Michael Vandeberg committed Jan 7, 2019
    Configuration menu
    Copy the full SHA
    fded6d7 View commit details
    Browse the repository at this point in the history