mirror of
https://github.com/Qortal/qortal.git
synced 2025-02-11 17:55:50 +00:00
Merge pull request #176 from QuickMythril/votes-api-fix
Fixed vote weight results API call
This commit is contained in:
commit
dcedcf8685
@ -142,7 +142,7 @@ public class PollsResource {
|
||||
for (VoteOnPollData vote : votes) {
|
||||
String voter = Crypto.toAddress(vote.getVoterPublicKey());
|
||||
AccountData voterData = repository.getAccountRepository().getAccount(voter);
|
||||
int voteWeight = voterData.getBlocksMinted() - voterData.getBlocksMintedPenalty();
|
||||
int voteWeight = voterData.getBlocksMinted() + voterData.getBlocksMintedPenalty();
|
||||
if (voteWeight < 0) voteWeight = 0;
|
||||
totalWeight += voteWeight;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user