Closed KarimJedda closed 1 year ago
I don't think you are doing something wrong, I was actually wondering the same, but when I tried the same code with PolkadotJS I was experiencing the same (executed on JS playground https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama.api.onfinality.io%2Fpublic-ws#/js):
const unsub = await api.rpc.chain.subscribeFinalizedHeads((header) => {
console.log(`#${header.number}:`, header);
});
So it is returned this way by the RPC, not sure what the exact reason is..
Alright, thanks for confirming. I'll ask around to try to understand what is going on. It seems that this might be hinting at a potential reason.
Alright, thanks for confirming. I'll ask around to try to understand what is going on. It seems that this might be hinting at a potential reason.
That makes a lot of sense, learned something too here.. Thanks for sharing
So a bit of a curiosity this time. When subscribing to new blocks but only caring about finalized ones, some blocks get skipped.
will give:
Am I doing something wrong? Thanks a lot!