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

chore: add spawn single node example #2739

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mickvandijke
Copy link
Contributor

Adds an example of how to programmatically spawn a single node and bootstrap it to the network.

@RolandSherwin RolandSherwin added this pull request to the merge queue Mar 5, 2025
@RolandSherwin RolandSherwin removed this pull request from the merge queue due to a manual request Mar 5, 2025
async fn main() {
// Using the genesis node as a bootstrap node for example
let bootstrap_peers = vec![
Multiaddr::from_str("/ip4/209.97.181.193/udp/57402/quic-v1/p2p/12D3KooWHygG9a7inESky2KpvHQmbX5o2UC8D29B5njdshAcv1p6")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the multiaddr of a node from the current PROD? Do you think it would be better to do PeersArg::get_bootstrap_addr(None, 1) here? It would fetch a peer from the live PROD network. So no worries of the hardcoded ip/node going down.

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

Successfully merging this pull request may close these issues.

2 participants