1
0

ln: handle channel limits better, show remote limits in details dialog, replace rusty's testnet peer (doesn't work currently)

This commit is contained in:
Janus
2019-01-28 20:13:09 +01:00
committed by ThomasV
parent 0a08ccc1c6
commit e6bd3959e0
5 changed files with 51 additions and 11 deletions

View File

@@ -71,6 +71,7 @@ class RemoteConfig(NamedTuple):
max_accepted_htlcs: int
initial_msat: int
reserve_sat: int
htlc_minimum_msat: int
# specific to "REMOTE" config
next_per_commitment_point: bytes
revocation_store: 'RevocationStore'
@@ -103,6 +104,15 @@ MIN_FINAL_CLTV_EXPIRY_ACCEPTED = 144
MIN_FINAL_CLTV_EXPIRY_FOR_INVOICE = MIN_FINAL_CLTV_EXPIRY_ACCEPTED + 1
# When we open a channel, the remote peer has to support at least this
# value of mSATs in HTLCs accumulated on the channel, or we refuse opening.
# Number is based on observed testnet limit https://github.com/spesmilo/electrum/issues/5032
MINIMUM_MAX_HTLC_VALUE_IN_FLIGHT_ACCEPTED = 19_800 * 1000
MAXIMUM_HTLC_MINIMUM_MSAT_ACCEPTED = 1000
MAXIMUM_REMOTE_TO_SELF_DELAY_ACCEPTED = 2016
class RevocationStore:
""" Taken from LND, see license in lnchan.py. """