-
Notifications
You must be signed in to change notification settings - Fork 23
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
Start the embedded node on test net chain if the active wallet is_testnet is true. #4
Conversation
…ent wallet to start the embeeded node using chain type Testnet.
This maybe? Does a previously started node need to be gracefully shutdown? |
Yes, what you've started here is what I had in mind. Since users will be able to open and close wallets that may have different node settings or swap between mainnet and testnet freely, we'll also need the ability to start and shut down the internal node. Shutting down the server should just be a case of calling server.stop() in the run function of node/mod.rs. The overall design should look like (again, this is in my head so everything is open to discussion):
Between this and the work that @sheldonth is doing with opening, closing and configuring wallets, this should make the gui extremely flexible, The idea is that users should be able to create new wallets or select and run existing wallets via the gui, as well as provide total flexibility around which node is used. A new user should be led through the process of creating a new, default wallet out of the box and have a node spin up with minimal interaction. |
…king ownership. This allows the controller to be shutdown gracefully using the transmit channel in the NodeInterface.
…Create wallet should use state.is_testnet to set the test_node of the wallet in WalletInterface::init. The nodeinteface chain should also be set when a wallet is open.
Still pretty messy. But making some progress on setting the appropriate chains for Node interface and Wallet interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good so far, and thanks for looking into this! We're still in an early phase of development, so I'll just merge what's here so far and we can forge ahead.
I've made the assumption here that there will only ever be one internal embedded node. This node's chain type will be based off of the active wallet's is_testnet flag.