Skip to content
Unverified Commit 9f2fa19e authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

chainHead/follow: Provide multiple block hashes to the initialized event (#3445)



This PR extends the Initialized event of the chainHead_follow
subscription.

Now, the event provides multiple finalized block hashes. This
information allows clients that are disconnected, and that want to
reconnect, to not lose information about the state of the chain.

At the moment, the spec encourages servers to provide at least 1 minute
of finalized blocks (~10 blocks). The users are responsible for
unpinning these blocks at a later time. This PR tries to report at least
1 finalized block and at most 16 blocks, if they are available.


Closes: https://github.com/paritytech/polkadot-sdk/issues/3432
cc @paritytech/subxt-team

---------

Signed-off-by: default avatarAlexandru Vasile <[email protected]>
Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
parent 475e7a14
Pipeline #452576 failed with stages
in 1 hour, 53 minutes, and 6 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment