1

Is there any variable in the bitcoind code that records the timestamp when a block is received for the first time by a particular node? To be more precise, for transactions, transaction information returned by Bitcoind JSON RPC API contains timereceived. Is there similar field for blocks in the API?

There happens to be similar existing questions in stackexchange but none of them has been appropriately answered.

1

I don't believe this is exposed via the JSON-RPC API.

The easiest method would likely be to have a program monitoring debug.log and look for the best height update messages - they will be a few milliseconds off, since I believe those are only logged after block validation has succeeded, but it is likely the closest you can get to a per-node block receipt time, at least without monitoring the network traffic.

| improve this answer | |
  • Thanks. In that last line you mention "without monitoring the network traffic". It would be great if you could elaborate on how to determine the timestamps when a block is received by monitoring the network traffic. – Dragonboy May 28 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.