iov-core icon indicating copy to clipboard operation
iov-core copied to clipboard

Use reconnectedHandler in Tendermint

Open webmaster128 opened this issue 5 years ago • 1 comments

Looks like we closed https://github.com/iov-one/iov-core/issues/229 a bit too early. We now have ReconnectingSocket, which accepts a reconnectedHandler. However, this handler is never used.

What we need for https://github.com/iov-one/ponferrada/issues/14 is clients that keep track of subsciptions they have. As soon as the socket reconnects, those subscriptions need to be recreated. This affects WebsocketClient from the Tendermint package and WsEthereumRpcClient.

This is needed for the browser extension to track transaction state after postTx. For Ethereum we use polling in this case, so this is lower priority. But in case of BNS, we use both transaction and block subscriptions in postTx, so this is needed for https://github.com/iov-one/ponferrada/issues/14.

  1. Use reconnectedHandler in Tendermint (this ticket)
  2. Use reconnectedHandler in Ethereum (https://github.com/iov-one/iov-core/issues/1204)

webmaster128 avatar Aug 15 '19 07:08 webmaster128

Extracted https://github.com/iov-one/iov-core/issues/1204 out of this one

webmaster128 avatar Aug 20 '19 07:08 webmaster128