[SteemSQL Wrapper] Fixed and optimized the delay info

in utopian-io •  7 years ago  (edited)

The last few days SteemSQL Wrapper had some problems with displaying the delay — it just did not load and SteemSQL Wrapper always displays Delay: loading..., if you did use API then you were getting 504 Gateway Time-out.

It was caused because of steemd.steemit.com was deprecated on 6th of January. I used steem-python to get the last block from the blockchain but it uses steemd as a default node. This problem can be easily solved by setting a custom node. But while I did search a reason for the problem, I decided full remove steem-python from the project.

image.png

In fact, it was a bad solution — checking the time of the last block in SteemSQL and comparing it with current time is enough because Steem gets a new block every 3 seconds.

A quotation from the White Paper:

Because the active witnesses are known in advance, Steem is able to schedule witnesses to produce blocks every 3 seconds.

So now this part of the project is optimized and now you can get the delay info faster.

Commit

image



Posted on Utopian.io - Rewarding Open Source Contributors

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:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Thanks!

Hey @emptyname I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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