1

I'am writing an application which receives information about new tx and blocks via ZeroMQ. There is a chance that I will receive notifs about blocks which will later on become stale blocks. Is there a way to verify whether the block has become stale?

1 Answer 1

1

I don't believe there is a direct way to do this via ZeroMQ. Your best bet would be to validate the ancestry for each block as you receive it.

When you receive a block, check its parent hash against blocks you have already seen. If the parent chain validates and you do not have another, longer child chain from the parent block already, you can accept this block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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