Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the time unit of the block timestamps in testrpc? #117

Open
drandreaskrueger opened this issue Nov 29, 2018 · 1 comment
Open

what is the time unit of the block timestamps in testrpc? #117

drandreaskrueger opened this issue Nov 29, 2018 · 1 comment

Comments

@drandreaskrueger
Copy link

  • versions: web3 4.7.2, testrpc 1.3.5, python 3.5.3
  • OS: linux

What was wrong?

when I read
web3.eth.getBlock(blockNumber) ["timestamp"]
from two blocks
which were actually (i.e. I measured) produced at 38.8 seconds apart.

and then subtract these timestamps, I get a difference of 7945 units.

Why not 39, or 38800 or 38800000 ?
i.e. anything that remotely resembles {,milli,micro,nano}seconds.

Have a look:
what-are-the-units-of-the-block-timestamp

I had hammered 1000 transactions at testrpc-py, which took 38.8 seconds to finish.

Cute Animal Picture

http://www.vidaenigmatica.org/wp-content/uploads/2016/12/cute-croc.jpg

@drandreaskrueger
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant