0

Will the result of getBlockByNumber change due to the longest chain issue?

Say, I called getBlockByNumber(100000) now and got block A. 10 mins later, it turns out block A is not in the longest chain. Will the result of getBlockByNumber(100000) change then?

1

Yep. This is only true for a few blocks close to the head block. For older blocks, it is probabilistically unlikely a re-org would happen.

  • Thanks @erkt. So you mean the result is not final, right? Btw, what's the recommended number of blocks to wait so I can be, say, 99.9% confident it won't re-org in the future. – Louis Yu May 29 '18 at 7:25

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.