how-to-build-your-own-blockchain icon indicating copy to clipboard operation
how-to-build-your-own-blockchain copied to clipboard

Added WebSocket support to the mine request

Open dafnarosenblum opened this issue 7 years ago • 1 comments

Mining a block might take a long time. As a result, a server response might block the client from performing further requests or even cause a timeout error. To prevent this from happening, we replaced the current REST API of /blocks/mine with a websocket interface. This way, the server can notify the client right after a new block was created. The client then closes the connection.

The pushed files include the new implementation (14_websocket.ts) a websocket client (14_websocket_client.js) and a bash script which executes the client file (14_websocket.sh).

dafnarosenblum avatar Jan 07 '18 21:01 dafnarosenblum

Hey @dafnarosenblum, Thanks a lot for your submission! The competition will be closed tonight and we'll start the evaluation process. It shouldn't take more than 1-2 weeks and we will publish the winners and the scoring criteria and process before our next event.

P.S., Unless you have already submitted your details and a contact to [email protected] - please do.

lbeder avatar Jan 16 '18 15:01 lbeder