watchBlock
using a wss
transport not emitting latest block when emitOnBegin
is enabled
#2733
Closed
1 task done
Check existing issues
Viem Version
2.21.0
Current Behavior
We're running into a case with
watchBlocks
using awss
transport not properly emitting the latest block whenemitOnBegin
is enabled. We're noticing this on an L3 Arbitrum chain with low tx volume, Arbitrum only generates new block as new TX come in.Blocks are emitted as soon as a new TX/Block is made.
Expected Behavior
emitOnBegin
always emits the latest available block on begin(similar to how
http
would, orwss
transport using polling)Steps To Reproduce
Link to Minimal Reproducible Example
https://gist.github.com/ya7ya/322444102d4b926c289148bc98973010
Anything else?
No response
The text was updated successfully, but these errors were encountered: