Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only query finalized blocks in javascript client
A difference between the behavior of the rust and javascript clients has been observed which leads to StaleTableData errors in the javascript. When no particular block was requested, the javascript client was simply using the jsonrpc getStorage method without supplying a block. In this case, the jsonrpc uses the latest block, which is not necessarily finalized. On the other hand, the rust was implicitly requesting the latest finalized block via subxt. This change makes it so the javascript is only requesting finalized blocks too, which is important since only events in finalized blocks are inserted to the database.
- Loading branch information