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

setchain with daemon does not switch electrum-server #139

Open
ELM4Ever opened this issue Jul 14, 2015 · 3 comments
Open

setchain with daemon does not switch electrum-server #139

ELM4Ever opened this issue Jul 14, 2015 · 3 comments

Comments

@ELM4Ever
Copy link

ELM4Ever commented Jul 14, 2015

When changing chain with only the daemon running, encompass does not switch to the new chain electrum-servers. (today's version of develop branch).

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/24346284-setchain-with-daemon-does-not-switch-electrum-server?utm_campaign=plugin&utm_content=tracker%2F11867956&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F11867956&utm_medium=issues&utm_source=github).
@Kefkius
Copy link
Member

Kefkius commented Jul 15, 2015

Yeah, setchain only changes the active chain in the user config. The thing about the daemon is that as it currently stands, the daemon can't switch chains like the rest of the wallet. There isn't a mechanism in place to make the daemon switch to the new set of servers.

That's why none of the commands that require a network connection have the --chain optional argument available. The Network class that controls the core behavior of this has no means of switching chains. It's something we're aware of, we just haven't agreed on the best solution.

Our known options are:

  1. Create functionality for the Network class to switch chains like the rest of Encompass.
  2. Use one Network thread per chain.

The first option is the most intuitive, but the second option paves the way for a server managing multiple currencies at once. However, the second option comes with more complications as well. It would mean a lot more threads running concurrently (each server connected to also has its own thread).

Until we figure out the best solution, this issue will exist. At least this creates a place for discussion on the decision-making.

@ELM4Ever
Copy link
Author

My interests would lean towards option 2.

A work around would be to run two instances of option 1 in parallel - but it wouldn't be as elegant as option 2.

@Kefkius
Copy link
Member

Kefkius commented Jul 23, 2015

@ELM4Ever For expediency I already implemented option 1. However, a way to run the daemon that supports having more than one coin network at a time is something I've been thinking about. It will likely be implemented in the future.

Keep this issue open in the meantime.

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

No branches or pull requests

2 participants