|
|
@ -50,7 +50,7 @@ if TYPE_CHECKING: |
|
|
|
|
|
|
|
OLD_SEED_VERSION = 4 # electrum versions < 2.0 |
|
|
|
NEW_SEED_VERSION = 11 # electrum versions >= 2.0 |
|
|
|
FINAL_SEED_VERSION = 26 # electrum >= 2.7 will set this to prevent |
|
|
|
FINAL_SEED_VERSION = 27 # electrum >= 2.7 will set this to prevent |
|
|
|
# old versions from overwriting new format |
|
|
|
|
|
|
|
|
|
|
@ -172,6 +172,7 @@ class WalletDB(JsonDB): |
|
|
|
self._convert_version_24() |
|
|
|
self._convert_version_25() |
|
|
|
self._convert_version_26() |
|
|
|
self._convert_version_27() |
|
|
|
self.put('seed_version', FINAL_SEED_VERSION) # just to be sure |
|
|
|
|
|
|
|
self._after_upgrade_tasks() |
|
|
@ -587,6 +588,14 @@ class WalletDB(JsonDB): |
|
|
|
c['closing_height'] = closing_txid, closing_height, closing_timestamp |
|
|
|
self.data['seed_version'] = 26 |
|
|
|
|
|
|
|
def _convert_version_27(self): |
|
|
|
if not self._is_upgrade_method_needed(26, 26): |
|
|
|
return |
|
|
|
channels = self.data.get('channels', {}) |
|
|
|
for channel_id, c in channels.items(): |
|
|
|
c['local_config']['htlc_minimum_msat'] = 1 |
|
|
|
self.data['seed_version'] = 27 |
|
|
|
|
|
|
|
def _convert_imported(self): |
|
|
|
if not self._is_upgrade_method_needed(0, 13): |
|
|
|
return |
|
|
|