bug: emitOnBegin not working as expected #1700
-
Is there an existing issue for this?
Package Version2.0.6 Current BehaviorWhen emitOnBegins is false, the first block emitted is still very often the latest block of the chain, because the first poll will retrieve it and emit it (unless a new block is emitted between the start & the first poll, but it's very unlikely with low polling intervals). Expected BehaviorOnly blocks mined after watchBlock is started are emitted Steps To Reproduce
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)No response Anything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The purpose of the Maybe we can add a flag to start polling once a new incoming block comes in. Moving this issue to a discussion labelled as "feature request". |
Beta Was this translation helpful? Give feedback.
The purpose of the
emitOnBegin
flag is to emit first, and then start polling, regardless of block number.Maybe we can add a flag to start polling once a new incoming block comes in.
Moving this issue to a discussion labelled as "feature request".