1
0

channel backup versions: trivial clean-up

This commit is contained in:
SomberNight
2020-06-17 17:17:05 +02:00
committed by ThomasV
parent f9788a5d90
commit e1a2299f0c
2 changed files with 8 additions and 9 deletions

View File

@@ -202,7 +202,8 @@ class ChannelBackupStorage(StoredObject):
vds = BCDataStream()
vds.write(s)
version = vds.read_int16()
assert version == CHANNEL_BACKUP_VERSION
if version != CHANNEL_BACKUP_VERSION:
raise Exception(f"unknown version for channel backup: {version}")
return ChannelBackupStorage(
is_initiator = bool(vds.read_bytes(1)),
privkey = vds.read_bytes(32).hex(),