Closed tchardin closed 2 years ago
I think this API will make the whole data transfer module way easier to use, it can be cloned and shared between threads. The client is stateless, there is no mutex or any mutable shared references between threads so very little risks of complex race conditions beyond the muxer events. I quite like it!
Lets see if the client works when deployed before we consider merging this.
Works like a charm. Will clean up tomorrow. It's kind of wild the entire code for graphsync and data transfer fit in pretty much 800 lines of code. Performance is almost identical to the other provider, and although the graphsync and data transfer abstractions aren't separated the code feels more digestible to me.