steemit / steem-python

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

Add regenerated VP to VP on last vote on account.voting_power() method #102

Closed emre closed 6 years ago

emre commented 6 years ago

Related discussion: https://steemit.com/utopian-io/@yuxid/the-voting-power-returned-from-python-library-is-inconsistent-with-steemd

codewithcheese commented 6 years ago

This would be a breaking change for those using the value in their own calculation of the current voting power. Would be better as a new method, like current_voting_power()

crokkon commented 6 years ago

I think you need .total_seconds() instead of .seconds? .seconds will be wrong if the difference is larger than a day. Also it will give values >100% if the last vote is long enough in the past

emre commented 6 years ago

Agreed both of your points. @codewithcheese @crokkon.

However, I don't mind to fix it right now since nobody in the projects reviews these. Closing this.