ThomasV
6 years ago
committed by
SomberNight
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
2 changed files with
4 additions and
2 deletions
-
electrum/lnpeer.py
-
electrum/lnworker.py
|
|
@ -337,7 +337,7 @@ class Peer(PrintError): |
|
|
|
channel_reserve_satoshis=local_config.reserve_sat, |
|
|
|
htlc_minimum_msat=1, |
|
|
|
) |
|
|
|
payload = await asyncio.wait_for(self.channel_accepted[temp_channel_id].get(), 1) |
|
|
|
payload = await asyncio.wait_for(self.channel_accepted[temp_channel_id].get(), 20) |
|
|
|
if payload.get('error'): |
|
|
|
raise Exception('Remote Lightning peer reported error: ' + repr(payload.get('error'))) |
|
|
|
remote_per_commitment_point = payload['first_per_commitment_point'] |
|
|
|
|
|
@ -429,7 +429,7 @@ class LNWorker(PrintError): |
|
|
|
choice = random.choice(addr_list) |
|
|
|
return choice.host, choice.port |
|
|
|
|
|
|
|
def open_channel(self, connect_contents, local_amt_sat, push_amt_sat, password=None, timeout=5): |
|
|
|
def open_channel(self, connect_contents, local_amt_sat, push_amt_sat, password=None, timeout=20): |
|
|
|
node_id, rest = extract_nodeid(connect_contents) |
|
|
|
peer = self.peers.get(node_id) |
|
|
|
if not peer: |
|
|
@ -787,6 +787,8 @@ class LNWorker(PrintError): |
|
|
|
channels = list(self.channels.values()) |
|
|
|
now = time.time() |
|
|
|
for chan in channels: |
|
|
|
if chan.is_closed(): |
|
|
|
continue |
|
|
|
if constants.net is not constants.BitcoinRegtest: |
|
|
|
ratio = chan.constraints.feerate / self.current_feerate_per_kw() |
|
|
|
if ratio < 0.5: |
|
|
|