mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
parent
db063517ec
commit
9fa666f179
1 changed files with 2 additions and 2 deletions
|
@ -190,7 +190,7 @@ class ChannelBackupStorage(StoredObject):
|
||||||
chan_id, _ = channel_id_from_funding_tx(self.funding_txid, self.funding_index)
|
chan_id, _ = channel_id_from_funding_tx(self.funding_txid, self.funding_index)
|
||||||
return chan_id
|
return chan_id
|
||||||
|
|
||||||
def to_bytes(self):
|
def to_bytes(self) -> bytes:
|
||||||
vds = BCDataStream()
|
vds = BCDataStream()
|
||||||
vds.write_int16(CHANNEL_BACKUP_VERSION)
|
vds.write_int16(CHANNEL_BACKUP_VERSION)
|
||||||
vds.write_boolean(self.is_initiator)
|
vds.write_boolean(self.is_initiator)
|
||||||
|
@ -206,7 +206,7 @@ class ChannelBackupStorage(StoredObject):
|
||||||
vds.write_int16(self.remote_delay)
|
vds.write_int16(self.remote_delay)
|
||||||
vds.write_string(self.host)
|
vds.write_string(self.host)
|
||||||
vds.write_int16(self.port)
|
vds.write_int16(self.port)
|
||||||
return vds.input
|
return bytes(vds.input)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_bytes(s):
|
def from_bytes(s):
|
||||||
|
|
Loading…
Add table
Reference in a new issue