It’s Not That Difficult

#include “etherlib.h”
int main(int argc, char *argv[]) {
init_etherlib();
for (int i = 0 ; i < getLatestBlock() ; i++) {
CBlock block;
getBlock(block, i);
cout << block.blockNumber << “,”;
cout << block.timestamp << “,”;
cout << block.difficulty << end;
}
}
blocknumber, timestamp, difficulty
0, 1438269960, 17179869184
1, 1438269988, 17171480576
2, 1438270017, 17163096064

8981997, 1574448913, 2432407853358678
8981998, 1574448935, 2432545292312150
8981999, 1574448985, 2427931666241578
8982000, 1574449029, 2424512564668329
2 ** (floor(current_block_no / 100,000) - 2)

--

--

--

Blockchain Enthusiast, Founder TrueBlocks, LLC and Philadelphia Ethereum Meetup, MS Computer Science UPenn

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Issuing certificates with the EW Origin SDK (Part II)

What is XLM Stellar Lumens? Want to get some for free! Free Money?

IQ Protocol Welcomes DeNet

How to Withdraw BEP-20 Tokens on Binance Smart Chain

IQ Protocol Welcomes bitsCrunch

Recap: Security Tokens Realised London

Degrees of Decentralization: August 6, 2017 Snippets

Ethereum and Solidity: The Complete Guide For Beginners.

| blog.tedbree.com | header image | Ethereum and Solidity: The Complete Guide For Beginners|

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Thomas Jay Rush

Thomas Jay Rush

Blockchain Enthusiast, Founder TrueBlocks, LLC and Philadelphia Ethereum Meetup, MS Computer Science UPenn

More from Medium

ESG Investing: What it Means, How it Works, and Developing Trends

ESG

Networks and Flywheels

The Misbehaviour of Markets

Blockchain’s Applications For The Space Industry