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:
@@ -156,7 +156,7 @@ class SPV(NetworkJobOnDefaultServer):
|
||||
|
||||
async def _maybe_undo_verifications(self):
|
||||
def undo_verifications():
|
||||
height = self.blockchain.get_forkpoint()
|
||||
height = self.blockchain.get_max_forkpoint()
|
||||
self.print_error("undoing verifications back to height {}".format(height))
|
||||
tx_hashes = self.wallet.undo_verifications(self.blockchain, height)
|
||||
for tx_hash in tx_hashes:
|
||||
|
||||
Reference in New Issue
Block a user