-
Notifications
You must be signed in to change notification settings - Fork 3
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
Reusable/util Swarm #6
Comments
@lexnv I am looking into it. I currently need the behavior PeerId+Discovery and you use also the PeerId+Discovery+Notification, are you planning on putting together other sets? Perhaps we could provide utility swarm creation for the typical ones. |
One way to approach this would be to make the default-behavior exposed by the subp2p explorer have an optional In the meanwhile, I think you could use the following approach: subp2p-explorer/cli/src/utils.rs Lines 107 to 128 in da19e6d
And define your own custom Behavior protocol, similar to: subp2p-explorer/subp2p-explorer/src/lib.rs Lines 15 to 22 in da19e6d
|
Having an optional notifications, or a behavior with optional sub-behaviors sounds ideal. I will investigate. Yes, perhaps we can start by the default behaviour. |
Projects depending on subp2p explorer will need to build a swarm too.
It would be beneficial to move the swarm building code to utility including the typical sets of behaviors used, while still allowing for a custom set of behaviors.
This would also facilitate managing the later #3 migration.
The text was updated successfully, but these errors were encountered: