Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Network selector #1729
A new CLI option is added:
Example of using a livenet-compiled wallet to run on betanet:
This is a CLI option instead of a config option because the config-file may not exist yet.
The ACTIVE_NETWORK build flag is still there to define the default value if no network option is present. As a result, RC builds for beta don't require a network option, so startup scripts, etc should work as before.
As discussed in #1099, some other projects use flags such as -testnet, but those mean sightly different things. A --network flag makes it clear that we don't follow any other projects' network naming standard and it mirrors how we choose network at compile-time (this doesn't seem like an option regular users will employ)
Tests pass and it appears to sync fine on both networks.
@guilhermelawless If you pick the wrong database, an error is logged and the node exits (that's already the case). The data path should probably change to defaults if you don't supply a path; I'll change it so that the network is checked before data_path. Thanks.