ChluNetwork / chlu-ipfs-support

Support libs to talk to IPFS
MIT License
1 stars 1 forks source link

First-pass validation module, documentation #37

Closed fazo96 closed 6 years ago

fazo96 commented 6 years ago

Opening this to track progress. Issue ref #27

Prerequisites

First-pass validation module

fazo96 commented 6 years ago

@kulpreet Since this PR is quite big I split it into three parts (see edited description) so that we can merge this when the first part is done (basic validation) and then leave the rest for later

fazo96 commented 6 years ago

PR now also includes documentation and a rework of the broadcast function. It retries a couple of times while also rebroadcasting immediately when a new peer connects. It has configurable absolute timeout and also number of maximum retries and time between retries.

After completing (receiving the expected response) it stops all activity and clears all listeners.

The normal tests are passing but there are no specific tests for this function to check that the whole retrying and timing out thing works fine. I'll add some tomorrow

fazo96 commented 6 years ago

Added tests for the new improved broadcast function, also split some code out of the room module into a new servicenode module since it was specific to service nodes.

fazo96 commented 6 years ago

@kulpreet very good inputs, I addressed all the points