Closed turuslan closed 1 year ago
Thanks for the PR, I will have to run some tests to be sure that there are no unwanted side effects.
As you can imagine it was a bit of a struggle to make the async behavior of the websocket RPC play nice in a sync environment. Changes I already made where the introduction of the message queue and https://github.com/polkascan/py-substrate-interface/commit/a13577e45350b1df9b451bb16f5c221f57bf9c65 to fix race conditions between the subscription id and the first event of that subscription id.
There were sometimes still unexpected results though, so I'm looking forward to review this change, hoping to fix those issues.
Looks like original code expected subscription events to arrive earlier than subscription id, e.g.:
But there were two problems: