• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

spesmilo / electrum / 6096881777901568
60%
master: 64%

Build:
Build:
LAST BUILD BRANCH: 202602_win_build
DEFAULT BRANCH: master
Ran 22 Apr 2025 08:07AM UTC
Jobs 5
Files 86
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Apr 2025 07:52AM UTC coverage: 60.309% (+0.04%) from 60.269%
6096881777901568

Pull #9753

CirrusCI

f321x
suggest_splits: don't exclude single part configs for too small multi
part configs

I noticed certain ln payments become very unreliable. These payments are ~21k sat, from gossip to gossip sender, with direct, unannounced channel.

Due to the recent fix https://github.com/spesmilo/electrum/pull/9723 `LNPathFinder.get_shortest_path_hops()` will not use channels for the last hop of a route anymore that aren't also passed to it in `my_sending_channels`:

```python
if edge_startnode == nodeA and my_sending_channels:  # payment outgoing, on our channel
    if edge_channel_id not in my_sending_channels:
        continue
```

Conceptually this makes sense as we only want to send through `my_sending_channels`, however if the only channel between us and the receiver is a direct channel that we got from the r_tag and it's not passed in `my_sending_channel` it's not able to construct a route now.

Previously this type of payment worked as `get_shortest_path_hops()` knew of the direct channel between us and `nodeB` from the invoices r_tag and then just used this channel as the route, even though it was (often) not contained in `my_sending_channels`.

`my_sending_channels`, passed in `LNWallet.create_routes_for_payment()` is either a single channel or all our channels, depending on `is_multichan_mpp`:

```python
for sc in split_configurations:
	  is_multichan_mpp = len(sc.config.items()) > 1
```

This causes the unreliable, random behavior as `LNWallet.suggest_splits()` is supposed to `exclude_single_part_payments` if the amount is > `MPP_SPLIT_PART_MINAMT_SAT` (5000 sat).
As `mpp_split.py suggest_splits()` is selecting channels randomly, and then removes single part configs, it sometimes doesn't return a single configuration, as it removes single part splits, and also removes multi part splits if a part is below 10 000 sat:

```python
if target_parts > 1 and config.is_any_amount_smaller_than_min_part_size():
    continue
```

This will result in a fallback to all... (continued)
Pull Request #9753: ln: don't exclude single part configs for too small payments

9 of 10 new or added lines in 2 files covered. (90.0%)

448 existing lines in 6 files now uncovered.

21610 of 35832 relevant lines covered (60.31%)

3.01 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
50.1
0.05% electrum/lnworker.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
80.24
-0.29% electrum/crypto.py
1
68.4
-0.09% electrum/lnchannel.py
1
50.1
0.05% electrum/lnworker.py
5
87.21
-1.28% electrum/lnrouter.py
185
88.04
0.55% electrum/transaction.py
255
61.19
0.03% electrum/util.py
Jobs
ID Job ID Ran Files Coverage
1 6096881777901568.1 22 Apr 2025 08:07AM UTC 86
60.27
2 6096881777901568.2 22 Apr 2025 08:07AM UTC 86
60.28
3 6096881777901568.3 22 Apr 2025 08:07AM UTC 86
60.29
4 6096881777901568.4 22 Apr 2025 08:07AM UTC 86
60.26
5 6096881777901568.5 22 Apr 2025 08:21AM UTC 86
60.27
Source Files on build 6096881777901568
  • Tree
  • List 86
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Build #60968817...
  • Pull Request #9753
  • PR Base - master (#48552050...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc