Refactoring My Auto-Voter Code

in HiveDevs2 months ago

It’s been years since I originally wrote the code for my Auto-Voter here on HIVE. When I started with it I was trying to build a semi-intelligent Curation Bot that would do a bit of analysis on posts and then vote accordingly to try and earn some decent Curation Rewards. Of course the goalposts have shifted a bit since then and so I still had a bunch of redundant analysis code in there. I kind of gave up on doing anything too clever with it so it’s turned out to be just a vanilla auto-voter. Regardless, it was time I cleaned it up.

I probably cut out almost half of the code that was in there and added a bit of error handling and logging to make it a bit more robust, but one of the things that my supported authors might notice is that my votes are now coming in faster. There used to be a 5 minute delay for curators, but I don’t think that matters now so it’s simpler to just See Post -> Vote Post and be done with it.

Admittedly I’ve been a bit slack with my development relating to HIVE, but I still run a couple of services and have some ideas for development that haven’t yet made it past the drawing board. I am trying to polish up my skills a bit and iron out some of the bugs I’ve been living with for a while. It you notice anything weird going on with my votes then please let me know.

Sort:  

Yeah, that delay doesn't really matter much anymore after that one update. Does this run all the time? I thought about writing my own voter at one time, but it felt like a lot of work so I never got around to it.

Yes, it's supposed to run all the time.

That's cool. How did you accomplish that? Like a cron job?

No, it's just a Node script that polls an API for the next block every 3 seconds and then goes back to sleep. When its running properly my vote will probably be the first you'll see on your post.

Ah, sounds more complicated than I can handle!

It’s great that you know how to code.

That's a great work. Not all of the people know about it

I think the curation bot is a good idea and will take a lot of work out of your hands. I hope it performs well. Have a great weekend.

I never knew there is always a code for Auto Vote
Wow!

!PGM

Sent 0.1 PGM - 0.1 LVL- 1 STARBITS - 0.05 DEC - 1 SBT - 0.1 THG - 0.000001 SQM - 0.1 BUDS - 0.01 WOO - 0.005 SCRAP - 0.001 INK tokens

remaining commands 5

BUY AND STAKE THE PGM TO SEND A LOT OF TOKENS!

The tokens that the command sends are: 0.1 PGM-0.1 LVL-0.1 THGAMING-0.05 DEC-15 SBT-1 STARBITS-[0.00000001 BTC (SWAP.BTC) only if you have 2500 PGM in stake or more ]

5000 PGM IN STAKE = 2x rewards!

image.png
Discord image.png

Support the curation account @ pgm-curator with a delegation 10 HP - 50 HP - 100 HP - 500 HP - 1000 HP

Get potential votes from @ pgm-curator by paying in PGM, here is a guide

I'm a bot, if you want a hand ask @ zottone444


Yay! 🤗
Your content has been boosted with Ecency Points, by @buggedout.
Use Ecency daily to boost your growth on platform!