Final piece of the backend (at least for the current version), this pull request offers protection against old messages that would have already been voted by either Utopian-1UP or the Utopian bot.
This protection was necessary for the following reasons:
- The interest of Utopian 1UP comes from the front-running, voting after the bot as little to no interest at all.
- If the system doesn't check for previous vote of the trail and allocate a new dynamic vote weight, the vote will be casted a second time and Voting Power will be lost as a result.
Therefore I changed the flow as follow:
- All suggestions that have not been voted by either the trail or the bot are fetched from the database (
where voted==false
). - The server checks all of the suggestions data to see if they have been voted by either the trail or the bot since last call
- If yes,
voted
is updated totrue
and the suggestion is removed from the list that will be displaid - If no, well, nothing happens
In the current version on Heroku, you can see that this is working since although I ve let some old suggestions (already upvoted), they do not show in the main page.
Next steps:
- Implementation of SteemConnect into SteemPlus (cause ill need it for later here, I m already on it and Im super excited about it!)
- Release the 1UP button into SteemPlus!
- Drink champaign
Posted on Utopian.io - Rewarding Open Source Contributors