Skip to content
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

Consider add a second_node.py example #91

Closed
frafra opened this issue Jan 29, 2021 · 3 comments · Fixed by #96
Closed

Consider add a second_node.py example #91

frafra opened this issue Jan 29, 2021 · 3 comments · Fixed by #96

Comments

@frafra
Copy link

frafra commented Jan 29, 2021

Examples are useful and they all work well, but there is no example about how to run more than one node (a second_node.py or additional_node.py example).

As an alternative, first_node.py could become a generic node which tries to bootstrap if a host and a port are specified.

@bmuller
Copy link
Owner

bmuller commented Jan 30, 2021

Hey @frafra - both "get.py" and "set.py" run additional nodes, since running a node is necessary to interact with the network. I do take the point though that it might be a good idea to have a generalized script that could either be a long running bootstrap node or connect to an existing network. What if first_node.py was changed to just node.py, and then accepted an optional host/port argument. If the argument is omitted, then it would run as a bootstrap node. If the argument is given, then it will try to connect to that node and join its network. What do you think?

@frafra
Copy link
Author

frafra commented Jan 30, 2021

I think it would be great :)

@raminqaf
Copy link
Contributor

raminqaf commented Apr 6, 2021

@bmuller and @frafra I have created a PR and tried to implement the idea of a generalized node script. @bmuller can you please review it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants