While playing around with the new version of the Utopian bot, I noticed that the 'task-requests' where not upvoted, and couldn't seem to find why.
One of the posts I found to be non-upvoted in this category was actually pointing to a permlink that didn't exist but the others should have worked. After digging a bit, I realized what was going on:
- Because the bot couldn't find that wrong permlink, it thought that this post had no upvote
- At some point, the nb of upvotes is used in a division, and well. if you remember your maths lesson, dividing by zero is not a thing you want to do :
- Dividing by zero cause a NaN result to the calculate (Not a Number) and therefore the post wilth the wrong permlink couldn't be upvoted. The one with the right permlink was already upvoted so @elear fixed this in the database.
Now, to understand what was going on with the other contributions and prevent this I had to dig a little bit more and realize that:
- When calculating the votes pool for each categories, the votes are added to each other.
- Only one NaN is sufficient to ruin it all and cause the reward pool for the category to become NaN.
Therefore, I made sure in this commit that if we get a null number of votes for a reason or another, we'll set it to one instead.
It will prevent this situation from happening again.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Good One
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
something better ...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @stoodkev I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit