0

I've recently created a private ethereum blockchain and would like to time, personally, how long it will take to mine a block in the private blockchain I have created. I'm using the command line/geth JSON-RPC interface, so if there's a way to time how long it takes to mine a block from within the JSON-RPC CLI interface and put it in a file that would be very helpful.

  • Is there a reason why you want to time the block generation time as opposed to calculate it? (As suggested above) – lungj Jul 19 '18 at 16:31

1 Answers1

0

with the commandline:

eth.getBlock(83).timestamp-eth.getBlock(82).timestamp

where 83 and 82 are block numbers

with RPC just use eth_getBlockByNumber function

Nulik
  • 4,061
  • 1
  • 18
  • 30