mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
lnworker: set DATA_LOSS_PROTECT flag for LNGossip too
otherwise peers disconnect
This commit is contained in:
parent
e6fc8868b1
commit
efc8948c00
1 changed files with 3 additions and 1 deletions
|
@ -82,7 +82,10 @@ class LNWorker(Logger):
|
|||
Logger.__init__(self)
|
||||
self.node_keypair = generate_keypair(keystore.from_xprv(xprv), LnKeyFamily.NODE_KEY, 0)
|
||||
self.peers = {} # type: Dict[bytes, Peer] # pubkey -> Peer
|
||||
# set some feature flags as baseline for both LNWallet and LNGossip
|
||||
# note that e.g. DATA_LOSS_PROTECT is needed for LNGossip as many peers require it
|
||||
self.localfeatures = LnLocalFeatures(0)
|
||||
self.localfeatures |= LnLocalFeatures.OPTION_DATA_LOSS_PROTECT_OPT
|
||||
|
||||
async def maybe_listen(self):
|
||||
listen_addr = self.config.get('lightning_listen')
|
||||
|
@ -302,7 +305,6 @@ class LNWallet(LNWorker):
|
|||
super().__init__(xprv)
|
||||
self.ln_keystore = keystore.from_xprv(xprv)
|
||||
#self.localfeatures |= LnLocalFeatures.OPTION_DATA_LOSS_PROTECT_REQ
|
||||
self.localfeatures |= LnLocalFeatures.OPTION_DATA_LOSS_PROTECT_OPT
|
||||
self.invoices = self.storage.get('lightning_invoices', {}) # RHASH -> (invoice, direction, is_paid)
|
||||
self.preimages = self.storage.get('lightning_preimages', {}) # RHASH -> preimage
|
||||
self.sweep_address = wallet.get_receiving_address()
|
||||
|
|
Loading…
Add table
Reference in a new issue