This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
Event subscription as the first request results in fromBlock parameter to be deleted #570
Labels
issue/bug
Issues with the code-level bugs.
Describe the bug
Race condition arises when the first request made by a Websocket provider is a subscription to an event which includes a request for historical logs.
It's been fixed in
web3.js
but it seems that the same bug still exists incaver-js
.fromBlock
doesnt return events from the past web3/web3.js#3389How to reproduce
Create
Caver
usingWebsocketProvider
and request event subscription for the first request.If I call something like
await caver.klay.getAccounts()
before the subscription, it works fine.Expected behavior
All events of the contract from block 0 should be retrieved.
Environment (please complete the following information)
The text was updated successfully, but these errors were encountered: