-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/async await #202
Feat/async await #202
Conversation
* make `getMany()` AsyncIterable
* make `putMany()` AsyncIterable * remove check in `_findAndConnect()`
Still pending PeerId and PeerInfo async/await - they've been done but we can't use them until libp2p update libp2p-secio so use promisify in the interim where necessary, which is only in the tests.
31331c2
to
af14f24
Compare
ea846e5
to
4848b15
Compare
Co-Authored-By: dirkmc <[email protected]>
It makes me a bit nervous that the tests were passing when the protocols were switched around. @achingbrain do you think it's worth adding a test to catch that case? |
It worked because all nodes in the tests are JS nodes and the message deserialization code handles both message versions by checking to see if the relevant fields exist. I guess we could add a 'strict' mode that only processes one version of bitswap but that sounds beyond the scope of this PR. |
Ok fair enough - I can't officially approve as I opened the PR, but LGTM 👍 Let me know if and when you want me to merge + release |
Yes please, whenever you can :) |
Supersedes #192
This PR depends on a number of async/await PRs that are still WIP (peer-id, peer-info, etc) so it is still some way from being ready.