core-lightning/tests
Lagrang3 b0054aad46 renepay: accomodate fees in the payment flow
Min. Cost Flow does not take into account fees when computing a flow
    with liquidity constraints.
    This is a work-around solution that reduces the amount on every route to
    respect the liquidity bound. The deficity in the delivered amount is
    solved by running MCF once again.

    Changes:

    1. the function `flow_complete` allocates amounts to send over the set of routes
       computed by the MCF algorithm, but it does not allocate more than liquidity
       bound of the route. For this reason `minflow` returns a set of routes that
       satisfy the liquidity bounds but it is not guaranteed that the total payment
       reaches the destination therefore there could a deficit in the delivery:
       `deficit = amount_to_deliver - delivering`.

    2. in the function `add_payflows` after `minflow` returns a set of routes we
       call `flows_fit_amount` that tries to a allocate the `deficit` in the routes
       that the MCF have computed.

    3. if the resulting flows pass all payment constraints then we update
        `amount_to_deliver = amount_to_deliver - delivering`, and the loop
        repeats as long as `amount_to_deliver` is not zero.

    In other words, the excess amount, beyond the liquidity bound,
    in the routes is removed and then we try to allocate it
    into known routes, otherwise we do a whole MCF again just for the
    remaining amount.

    Fixes issue #6599
2024-01-29 10:48:24 +10:30
..
data db: migrate old runes table to fix up id fields. 2023-08-31 05:33:15 +09:30
fuzz fuzz: initial fuzz-bolt12-invoice-decode corpus 2024-01-23 20:21:48 +10:30
plugins libplugin: support version strings for deprecations. 2024-01-26 10:30:22 +10:30
vectors pytest: Remove onion test vectors containing legacy onions. 2022-03-18 09:20:11 +10:30
benchmark.py pytest: always provide payment_secret when making payments. 2021-07-14 14:38:00 -05:00
conftest.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
db.py test-db-provider: if postgres in tests, startup a bookkeeper db 2022-07-28 12:08:18 +09:30
fixtures.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
rkls_github_canned_server.py pytest: add blackbox tests for reckless 2023-04-09 12:41:11 +09:30
test_bookkeeper.py bkpr: now that we're not doing empty acct logging, we dont need this bool 2024-01-29 10:05:03 +10:30
test_cln_rs.py lightningd: remove msatoshi alias for amount_msat. 2024-01-26 10:30:22 +10:30
test_clnrest.py lightningd: don't print out notification msat fields as strings. 2023-11-21 08:23:39 +01:00
test_closing.py pyln-client: don't automatically turn JSON into Millisatoshi class. 2023-12-16 10:22:01 +01:00
test_connection.py topology: don't show private nodes in listchannels. 2023-12-14 09:16:56 +10:30
test_db.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
test_gossip.py plugins: re-enable listchannels local info in deprecated mode. 2023-12-14 09:16:56 +10:30
test_invoices.py pytest: note where we use very deprecated features, so tests don't rbeak. 2024-01-26 10:30:22 +10:30
test_misc.py pytest: don't assume that msat fields get turned into Millisatoshi. 2023-12-16 10:22:01 +01:00
test_mkfunding.py pytest: add tests for devtools/mkfunding 2023-01-09 14:50:30 -06:00
test_onion.py lightningd: remove support for legacy onion format. 2022-03-18 09:20:11 +10:30
test_opening.py pytest: fix tests in assumption that listchannels will no longer show private gossip. 2023-12-14 09:16:56 +10:30
test_pay.py bkpr: dont log unknown accounts with zero balances 2024-01-29 10:05:03 +10:30
test_plugin.py pytest: note where we use very deprecated features, so tests don't rbeak. 2024-01-26 10:30:22 +10:30
test_reckless.py pytest: add reckless local install test 2023-07-27 06:53:49 +09:30
test_renepay.py renepay: accomodate fees in the payment flow 2024-01-29 10:48:24 +10:30
test_runes.py pytest: correctly test missing method for runes. 2023-10-17 14:58:40 +10:30
test_splicing_disconnect.py splice: Reestablish when commit or sig sends fail 2023-11-20 07:35:22 +01:00
test_splicing_insane.py splice: Agressive restart testing during splices 2023-12-15 09:42:45 +10:30
test_splicing.py topology: don't show private nodes in listnodes. 2023-12-14 09:16:56 +10:30
test_wallet.py addpsbtoutput: allow command to specify output address. 2023-11-01 14:11:28 +10:30
utils.py lightningd: wumbo is now the default, setting has no effect. 2023-11-02 08:16:51 +01:00
valgrind-suppressions.txt pytest: Use valgrind target suppressions instead of skipping tests 2022-03-10 10:21:41 +10:30