This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Does subscribe("newBlockHeader",...) consistently provide the header of the most recent block? #6831
Unanswered
AlirezaEthDev
asked this question in
Q&A
Replies: 1 comment
-
No, subscribe("newBlockHeaders") does not guarantee delivery of every block header if the callback execution time is too long. The subscriber will always receive the latest block header, but it might skip intermediate blocks if the callback execution takes too long. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Assuming we are trying the blow code that subscribes to incoming block headers and returns the header of the i-th block in the ledger, triggering the execution of the callback function in then(). If the callback function takes an extended period such that the (i+1)-th and (i+2)-th blocks are added to the ledger, will the subscriber receive the header of the (i+1)-th or (i+2)-th block for subscription? Does it consistently provide the header of the most recent block?
Beta Was this translation helpful? Give feedback.
All reactions