[SteemSQL Wrapper] Fixed and optimized the delay info

Words
182
Reading
1 min
9y
Listen to this post
~1 min

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

[SteemSQL Wrapper] Fixed and optimized the delay info | Ecency