steemit / steem-python

The official Python (3) library for the Steem Blockchain.
https://steem.io
MIT License
153 stars 98 forks source link

The voting power returned from Python library is inconsistent with steemd #101

Open yuxisteem opened 7 years ago

yuxisteem commented 7 years ago

I have found a potential bug in Steem Python library. The voting power returned from Python library is inconsistent from the VP returned from steemd.com. For example, I ran the Python script to get my VP:

#!/usr/bin/env python

from steem.account import Account

account = Account("yuxid")
print("VP: %s" % account.voting_power())

At the time of testing, it returns:

VP: 43.48

However, it shows 59.39% in steemd

image.png



Posted on Utopian.io - Rewarding Open Source Contributors

E-D-A commented 7 years ago

That is actually correct behaviour. :) The VP value is only updated when you vote, so with the python query you get that value. The value on Steemd.com takes VP recovery into account and shows the actual value as if you would vote at that moment. Hope that explains.