Browse Source
fix channel backups with old "cryptography" module
closes #6314
bip39-recovery
SomberNight
5 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
2 additions and
2 deletions
-
electrum/lnutil.py
|
|
@ -190,7 +190,7 @@ class ChannelBackupStorage(StoredObject): |
|
|
|
chan_id, _ = channel_id_from_funding_tx(self.funding_txid, self.funding_index) |
|
|
|
return chan_id |
|
|
|
|
|
|
|
def to_bytes(self): |
|
|
|
def to_bytes(self) -> bytes: |
|
|
|
vds = BCDataStream() |
|
|
|
vds.write_int16(CHANNEL_BACKUP_VERSION) |
|
|
|
vds.write_boolean(self.is_initiator) |
|
|
@ -206,7 +206,7 @@ class ChannelBackupStorage(StoredObject): |
|
|
|
vds.write_int16(self.remote_delay) |
|
|
|
vds.write_string(self.host) |
|
|
|
vds.write_int16(self.port) |
|
|
|
return vds.input |
|
|
|
return bytes(vds.input) |
|
|
|
|
|
|
|
@staticmethod |
|
|
|
def from_bytes(s): |
|
|
|