You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
blockNumber$() is based on onEveryBlock$, which does a pubsub eth_subscribe('newHeads'). However, when we do blockNumber$().subscribe(), we might not get the latest block immediately, and need to wait for the next received block (can take up to 15s on mainnet).
A solution would be to make a JSONRPC call first, then do the pubsub subscribe.
Note: we were using parity_subscribe('eth_blockNumber') before, and that one returned immediately the latest block it had.
Note 2: do this on newHeads and on syncing pubsubs.
blockNumber$()is based ononEveryBlock$, which does a pubsubeth_subscribe('newHeads'). However, when we doblockNumber$().subscribe(), we might not get the latest block immediately, and need to wait for the next received block (can take up to 15s on mainnet).A solution would be to make a JSONRPC call first, then do the pubsub subscribe.
Note: we were using
parity_subscribe('eth_blockNumber')before, and that one returned immediately the latest block it had.Note 2: do this on newHeads and on syncing pubsubs.