Warning: mysqli_query(): (HY000/1021): Disk full (/tmp/#sql-a2c-1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") in /var/www/html/wp-includes/wp-db.php on line 2024

Warning: mysqli_query(): (HY000/1021): Disk full (/tmp/#sql-a2c-1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") in /var/www/html/wp-includes/wp-db.php on line 2024
class="post-443963 post type-post status-publish format-standard hentry" id="post-443963">

Retrieve block number from geth and display it on my webpage

I am running geth using this command:

geth -testnet --syncmode light console

and I am trying to retrieve the block number from geth and display it on my web app. In geth when I type:

eth.blockNumber

I get the block number to display. How can I get my web app to show the block number when the page loads?

I thought it would be something like this but its not working:

   web3.eth.getBlockNumber(function(err, num) 
      { if (err === null)  {   
           console.log(num);
      }});

Leave a Reply

Your email address will not be published. Required fields are marked *