Showing Real Time Block/Witness in Witness Page

in witness-category •  4 years ago 

To obtain the current witness and block, you can use the following Steem-Js code

steem.api.getDynamicGlobalProperties(function(err, result) {
        if (err) return;
        if (!result) return;
         var block = result.head_block_number;            
         var witness = result.current_witness;
         //update information: witness is producing the block
});

When we call the above function using setInterval like every 3 seconds, the block numbers are updated realtime.

image.png

Witness Ranking Table: https://steemyy.com/witness-ranking/
Chinese Version: https://steemyy.com/witness-ranking-table/


I hope this helps!

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com

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:  

Just because I needed something to occupy my time, here's something similar in bash shell script for linux...

#!/bin/bash
# Take API from first command line argument.  Use steemit if none given.
STEEMAPI="${1:-https://api.steemit.com}"

show_time_block_witness()
{
   NOW=$(date)
   curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' ${STEEMAPI} \
      2>/dev/null \
      | jq -c -S '.result | {head_block_number, current_witness}' \
      | tr '[,:"{}]' ' ' \
      | ( read LBL1 BLOCK LBL2 WITNESS ; echo ${NOW}: ${BLOCK} ${WITNESS} )
}

SLEEPTIME=3
MAX=20 # Approximately 1 minute
for (( i=1; i <= ${MAX} ; i++ ))
do
   sleep ${SLEEPTIME} &
   show_time_block_witness
   wait
done
  ·  4 years ago Reveal Comment

Showing Real Time Block/Witness in Witness Page

is it show error ?

  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago 

what i would advice you at this point is (if you are so hating steem):

  1. leave steem, stop posting here, nobody gives a damn sh*t of what you said.
  2. go (f*ck) fork yourself if that makes you feel any better.
  ·  4 years ago (edited)Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago (edited)Reveal Comment
  ·  4 years ago (edited)Reveal Comment
  ·  4 years ago 

Steem is doomed with guys like you, trying to damaging/destroying it. So yes, get your steems and just leave.

We could be here a while depending on your location. I'm still waiting to see if the 3 exchanges I can use enable deposits.

  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment
  ·  4 years ago 

LOL. I don't understand your weird logic.

  ·  4 years ago Reveal Comment
  ·  4 years ago Reveal Comment