1
0
Commit Graph

15 Commits

Author SHA1 Message Date
f321x
b4e93e7e38 fix: prevent lnrater from blocking if no good peers
the while loop in `suggest_node_channel_open()` of lnrater would not
break if there are no "good" peers available available. As a result the gui
blocks and electrum has to be killed. This can happen for example on
signet.
This removes the tested pk from the list of candidates so each candidate
gets tested only once.
2025-06-03 10:06:39 +02:00
f321x
7e4f87b564 fix: don't suggest onion peers for channel opening
`suggest_node_channel_open()` did suggest peers with onion hostname,
even if the caller has no proxy enabled. This causes channel openings in
the gui to sometimes just not work and show a `CancelledError()` becaues
it wasn't able to connect to the peer.
Now only clearnet peers will get recommended, as these will always work.
2025-04-30 11:24:46 +02:00
MrNaif2018
aafa74ed08 Improve _mythread checks (#7403)
* Improve _mythread checks

* Create get_running_loop util
2021-07-15 14:52:25 +00:00
SomberNight
52be6a5453 lnrater: use network.asyncio_loop instead of asyncio.get_event_loop()
fixes #5376
2021-04-08 10:46:54 +02:00
ThomasV
cd4df2fd85 detect conflicting channel backups, add warning before channel creation 2021-03-30 09:55:18 +02:00
SomberNight
a509573ea0 lnrater: don't suggest nodes we have a channel backup with
We don't want to connect to nodes we already have a channel with on another device.
2021-03-29 17:49:27 +02:00
gruve-p
9609a60ab6 Rename excluce to exclude (#7121) 2021-03-20 18:26:58 +00:00
SomberNight
691ebaf4f8 lnworker/lnpeer: add some type hints, force some kwargs 2021-02-24 20:03:12 +01:00
ThomasV
880353287d lnrater: fix #6764 2021-02-18 10:59:45 +01:00
bitromortac
5a72df2bb4 lnrater: suggest nodes compatible with our LN features 2021-01-11 11:37:14 +01:00
bitromortac
793f2569a7 lnrater: fix KeyError for unknown node 2020-11-26 20:01:05 +01:00
Jin Eguchi
eaacecf4a1 Fix get_running_loop (python<3.7) (#6765) 2020-11-24 20:39:30 +00:00
bitromortac
96c9a483d0 lnrater: follow-up
Add comment on node score and return copies of channel db dicts.
2020-11-17 10:48:42 +01:00
SomberNight
df6dc8fcf2 fix python 3.6 compat
fix #6725

follow-up #6705
2020-11-11 19:47:37 +01:00
bitromortac
cc9e19409f lnrater: module for node rating
Introduces LNRater, which analyzes the Lightning Network graph for
potential nodes to connect to by taking into account channel capacities,
channel open times and fee policies. A score is constructed to assign a
scalar to each node, which is then used to perform a weighted random
sampling of the nodes.
2020-11-06 08:00:23 +01:00