Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

feat: provide run command #14

Merged
merged 1 commit into from
Dec 19, 2023
Merged

feat: provide run command #14

merged 1 commit into from
Dec 19, 2023

Conversation

jacderida
Copy link
Contributor

NOTE: this commit also contains the corresponding kill command. I accidentally amended it and couldn't untangle the changes from it without losing them.

Spin up safenode processes, along with a faucet, to run a local network. These processes are not defined as services because they are not intended to be long running; they are for experimentation.

As in the testnet binary, the network is validated, but unlike in testnet the logs are not inspected. We just query each RPC service to check that peers are connected.

At present you need to supply paths to both binaries, but this will be extended shortly to provide the ability to run downloaded binaries.

The node registry was extended to keep track of the faucet process so it can easily be cleaned up in a subsequent kill command.

The status command is also extended to accommodate the local network.

NOTE: this commit also contains the corresponding `kill` command. I accidentally amended it and
couldn't untangle the changes from it without losing them.

Spin up `safenode` processes, along with a faucet, to run a local network. These processes are not
defined as services because they are not intended to be long running; they are for experimentation.

As in the `testnet` binary, the network is validated, but unlike in `testnet` the logs are not
inspected. We just query each RPC service to check that peers are connected.

At present you need to supply paths to both binaries, but this will be extended shortly to provide
the ability to run downloaded binaries.

The node registry was extended to keep track of the faucet process so it can easily be cleaned up in
a subsequent `kill` command.

The `status` command is also extended to accommodate the local network.
@jacderida jacderida merged commit cfba5e3 into maidsafe:main Dec 19, 2023
Comment on lines +143 to +144
#[clap(long)]
count: Option<u16>,
Copy link

Choose a reason for hiding this comment

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

Either set a default with clap or make sure it's documented what happens when --count isn't used.

Suggested change
#[clap(long)]
count: Option<u16>,
#[clap(long, default_value_t = DEFAULT_NODE_COUNT)]
count: u16,

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

Successfully merging this pull request may close these issues.

2 participants