1
0

prepare a channel to have anchors

* add anchor ln features
* peer.use_anchors is added
* channel.has_anchors is added
This commit is contained in:
bitromortac
2021-09-13 11:00:12 +02:00
committed by ThomasV
parent 19726c4427
commit 3951e07c53
3 changed files with 22 additions and 0 deletions

View File

@@ -496,6 +496,9 @@ class AbstractChannel(Logger, ABC):
"""
pass
def has_anchors(self) -> bool:
pass
class ChannelBackup(AbstractChannel):
"""
@@ -883,6 +886,10 @@ class Channel(AbstractChannel):
assert self.lnworker.wallet.is_mine(addr)
return addr
def has_anchors(self) -> bool:
channel_type = ChannelType(self.storage.get('channel_type'))
return bool(channel_type & ChannelType.OPTION_ANCHOR_OUTPUTS)
def get_wallet_addresses_channel_might_want_reserved(self) -> Sequence[str]:
assert self.is_static_remotekey_enabled()
our_payment_pubkey = self.config[LOCAL].payment_basepoint.pubkey