lnpeer+wallet: use channel type for channel open
* channel_type is put into storage, serialized as int and deserialized as ChannelType * check for static_remotekey is done via channel type
This commit is contained in:
@@ -107,6 +107,7 @@ def create_channel_state(funding_txid, funding_index, funding_sat, is_initiator,
|
||||
'fail_htlc_reasons': {},
|
||||
'unfulfilled_htlcs': {},
|
||||
'revocation_store': {},
|
||||
'channel_type': lnutil.ChannelType.OPTION_STATIC_REMOTEKEY
|
||||
}
|
||||
return StoredDict(state, None, [])
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ class MockLNWallet(Logger, NetworkRetryManager[LNPeerAddr]):
|
||||
self.features |= LnFeatures.VAR_ONION_OPT
|
||||
self.features |= LnFeatures.PAYMENT_SECRET_OPT
|
||||
self.features |= LnFeatures.OPTION_TRAMPOLINE_ROUTING_OPT
|
||||
self.features |= LnFeatures.OPTION_CHANNEL_TYPE_OPT
|
||||
self.pending_payments = defaultdict(asyncio.Future)
|
||||
for chan in chans:
|
||||
chan.lnworker = self
|
||||
|
||||
Reference in New Issue
Block a user