Conversation
c671216 to
ae53738
Compare
primary client is the one on the longest chain, when a secondary client has a chain that is longer than master + 2 it becomes the new master. this will allow us to move away from "dead" electrum servers that are not up to date with the blockchain. electrum client: add 'get header' method electrum: maintain a chain of headers for each client and switch to the one with the longest chain electrum: handle case when received header connects to our first header it can happen when we connect to a server and ask for the last N headers electrum: automatic reconnection when we lose connection to our master client, we consider that we are disconnected. when we lose connection to a secondary client, we try to find an address that is not used and connect to it. If there is no such address we wait a bit and try to reconnect to the failing client electrum: check that incoming header proof of work is valid electrum router: migrate to Akka's FSM electrum: fix match error for `ready` message add missing copyright headers move Blockchain to electrum package electrum: simplify router electrum client: fix handling of dead subscribers electrum: move blockchain validation into electrum client client will now send `ready` notifications and subscriptions messages only when it has a valid and long enough blockchain pass execution context as argument reworked `ElectrumRouter` following 3dc1c2b61c82debeaed8d0d92238c0b5ee5c49c8 renamed `ElectrumRouter` -> `ElectrumMultiClient` reformat `var` -> `val`
0e0601e to
6168b49
Compare
pm47
reviewed
Mar 23, 2018
| statusListeners.map(_ ! ElectrumDisconnected) | ||
| context.system.eventStream.publish(ElectrumDisconnected) | ||
| context become disconnected | ||
| versionTrigger.cancel() |
Member
There was a problem hiding this comment.
Why cancel the task only in that case? Why not call versionTrigger.cancel() from e.g. aroundPostStop?
dbef3c9 to
c18447e
Compare
c18447e to
575d647
Compare
pm47
approved these changes
Mar 23, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the one with the longest chain as master against which requests are sent