go-blocknative icon indicating copy to clipboard operation
go-blocknative copied to clipboard

Handle Connection ReInitialization (WIP)

Open bonedaddy opened this issue 4 years ago • 1 comments

Overview

As per the API docs this creates a workflow for reinitializing connections to the websockets API and replaying previous messages to re-establish the state

In the event of a WebSocket connection drop, no state is persisted between connections, so upon reconnection there will need to be logic defined that will: Send an initialization message Send all previously subscribed addresses, transactions and configs

Todo

  • Cleanup the new code, it's somewhat ugly and makes the library harder to read. This is just a first stab attempt *Update example in readme

bonedaddy avatar Jan 29 '21 05:01 bonedaddy

Codecov Report

Merging #4 (a9efbfc) into main (95a928c) will decrease coverage by 14.91%. The diff coverage is 42.55%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main       #4       +/-   ##
===========================================
- Coverage   74.07%   59.15%   -14.92%     
===========================================
  Files           3        3               
  Lines         108      142       +34     
===========================================
+ Hits           80       84        +4     
- Misses         23       51       +28     
- Partials        5        7        +2     
Impacted Files Coverage Δ
client/client.go 55.40% <35.71%> (-15.71%) :arrow_down:
client/history.go 100.00% <100.00%> (ø)
client/types.go 37.50% <0.00%> (-25.00%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 95a928c...a9efbfc. Read the comment docs.

codecov-io avatar Jan 29 '21 07:01 codecov-io