RE: Greenshift 011: Finding the Most Recent Vote

You are viewing a single comment's thread from:

Greenshift 011: Finding the Most Recent Vote

in greenshift •  6 years ago 

I'm just peeking at the history to get the most recent vote. Streaming gets live information from the blockchain, right? I don't think that will work since there's a chance that the author may not vote while the stream is live. I think though I will remove the loop and simply take a larger sample as that's probably more efficient than pinging the blockchain multiple times.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Yeah, that's basically what this tutoral does, except it's for comments instead of votes. But either op type would work:

https://developers.steem.io/tutorials-ruby/get_account_comments

If you look at the JavaScript version, they do get_state which is discouraged. While it's discouraged, it might be a more efficient API call at the moment. When hivemind goes live, these kinds of queries will probably be a lot more efficient.

At the moment, the best, non-descouraged-yet-still-efficient way is to use SteemSQL.

Cool. I like the way that's formatted. It's nicer than using indices just by passing that array as a block into another closure.