EYBlockchain / nightfall_3

a mono-repo containing an optimistic version of nightfall
Creative Commons Zero v1.0 Universal
263 stars 56 forks source link

avoid trying to 'ping' when ws state is not 'OPEN' #1379

Closed fullkomnun closed 1 year ago

fullkomnun commented 1 year ago

What does this implement/fix? Explain your changes.

Fixes an issue caused when trying to 'ping' by directly accessing the underlying ws while it is not in 'OPEN' state which might lead to an error thrown (causing 'optimist-sync-test' to fail spordically or crash 'proposer'/'challenger').

Does this close any currently open issues?

Not sure

What commands can I run to test the change?

run 'optimist-sync-test' locally or in ci:

NF_SERVICES_TO_START=blockchain,client,deployer,mongodb,optimist,rabbitmq,worker ./bin/setup-nightfall
NF_SERVICES_TO_START=blockchain,client,deployer,mongodb,optimist,rabbitmq,worker CONFIRMATIONS=1 ./bin/start-nightfall -g -d
npm run test-optimist-sync

Any other comments?