pay: Implement simple presplit fix for ludicrous amounts

This is the simplest possible fix: increase the target amount until we get
the desired number of parts, while still bucketizing payments together that
are in approximately the same size.

The current logic puts all payments that are in the range x < amount <= 16*x
in the same bucket, making them harder to distinguish.

Changelog-Fixed: pay: The `presplit` modifier now supports large payments without exhausting the available HTLCs.
This commit is contained in:
Christian Decker
2020-08-26 20:40:36 +02:00
committed by Rusty Russell
parent 3f6809c934
commit 21d87f7075
2 changed files with 17 additions and 3 deletions

View File

@@ -3473,7 +3473,6 @@ def test_mpp_interference_2(node_factory, bitcoind, executor):
p3.result(TIMEOUT)
@pytest.mark.xfail(strict=True)
def test_large_mpp_presplit(node_factory):
"""Make sure that ludicrous amounts don't saturate channels