1
0

wallet_db: upgrade to version 53, for imported chan backups

follow-up https://github.com/spesmilo/electrum/pull/8536

This replaces 69336befee, which was insufficient.
#8536 added a new field into the struct, which older versions do not ignore but raise:
opening a wallet file with new code updated the struct to include it,
after which old code could no longer open the wallet file.
i.e. #8536 was an invisible wallet upgrade, breaking compat.
This commit simply formalises the wallet upgrade: old code will now show
an understandable error when trying to open new files.
This commit is contained in:
SomberNight
2023-08-17 14:04:05 +00:00
parent 635880b3cb
commit cee22abcb5
2 changed files with 12 additions and 2 deletions

View File

@@ -285,7 +285,7 @@ class ImportedChannelBackupStorage(ChannelBackupStorage):
remote_delay = attr.ib(type=int, converter=int)
remote_payment_pubkey = attr.ib(type=bytes, converter=hex_to_bytes)
remote_revocation_pubkey = attr.ib(type=bytes, converter=hex_to_bytes)
local_payment_pubkey = attr.ib(type=bytes, converter=hex_to_bytes, default=None) # type: Optional[bytes]
local_payment_pubkey = attr.ib(type=bytes, converter=hex_to_bytes) # type: Optional[bytes]
def to_bytes(self) -> bytes:
vds = BCDataStream()