1
0

network: auto-switch servers to preferred fork (or longest chain)

If auto_connect is enabled, allow jumping between forks too.
(Previously auto_connect was only switching servers on a given fork,
not across forks)
If there is a preferred fork set, jump to that (and stay);
if there isn't, always jump to the longest fork.
This commit is contained in:
SomberNight
2018-10-11 19:42:38 +02:00
parent 1ef804c652
commit 37206ec08e
6 changed files with 103 additions and 59 deletions

View File

@@ -384,6 +384,7 @@ class Interface(PrintError):
self.mark_ready()
await self._process_header_at_tip()
self.network.trigger_callback('network_updated')
await self.network.switch_unwanted_fork_interface()
await self.network.switch_lagging_interface()
async def _process_header_at_tip(self):