cln/plugins
Rusty Russell 01bce4e7b7 askrene: don't crash if asked to route 0 msat.
But don't allow it either.

```
Jan 19 13:18:52 boltz lightningd[2259911]: cln-askrene: plugins/askrene/algorithm.c:274: simple_feasibleflow: Assertion `amount > 0' failed.
Jan 19 13:18:52 boltz lightningd[2259911]: cln-askrene: FATAL SIGNAL 6 (version v24.11.1-1-ge9dbdeb)
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e212b407 send_backtrace
Jan 19 13:18:52 boltz lightningd[2259911]:         common/daemon.c:33
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e212b49e crashdump
Jan 19 13:18:52 boltz lightningd[2259911]:         common/daemon.c:75
Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba9251f ???
Jan 19 13:18:52 boltz lightningd[2259911]:         ???:0
Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964bae69fc ???
Jan 19 13:18:52 boltz lightningd[2259911]:         ???:0
Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba92475 ???
Jan 19 13:18:52 boltz lightningd[2259911]:         ???:0
Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba787f2 ???
Jan 19 13:18:52 boltz lightningd[2259911]:         ???:0
Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba7871a ???
Jan 19 13:18:52 boltz lightningd[2259911]:         ???:0
Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba89e95 ???
Jan 19 13:18:52 boltz lightningd[2259911]:         ???:0
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211695e simple_feasibleflow
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/askrene/algorithm.c:274
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e2111495 minflow
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/askrene/mcf.c:1014
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e210bc74 get_routes
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/askrene/askrene.c:414
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e210c610 do_getroutes
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/askrene/askrene.c:615
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e210cad8 listpeerchannels_done
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/askrene/askrene.c:741
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211b35a handle_rpc_reply
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/libplugin.c:1084
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211b54c rpc_read_response_one
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/libplugin.c:1388
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211b5fd rpc_conn_read_response
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/libplugin.c:1412
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e214fe8f next_plan
Jan 19 13:18:52 boltz lightningd[2259911]:         ccan/ccan/io/io.c:60
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e215036e do_plan
Jan 19 13:18:52 boltz lightningd[2259911]:         ccan/ccan/io/io.c:422
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e215042b io_ready
Jan 19 13:18:52 boltz lightningd[2259911]:         ccan/ccan/io/io.c:439
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e2151e2e io_loop
Jan 19 13:18:52 boltz lightningd[2259911]:         ccan/ccan/io/poll.c:455
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211cc29 plugin_main
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/libplugin.c:2488
Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e210cb38 main
Jan 19 13:18:52 boltz lightningd[2259911]:         plugins/askrene/askrene.c:1262
Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba79d8f ???
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `getroutes` will refuse, not crash, if asked to find a route fr 0msat.
2025-01-28 10:53:22 +10:30
..
askrene askrene: don't crash if asked to route 0 msat. 2025-01-28 10:53:22 +10:30
bkpr wallet: save last known address. 2024-11-25 15:39:13 +10:30
clnrest build: Update poetry.lock files for CLN and built-in plugins 2025-01-15 10:36:43 -08:00
examples cln-plugin: add multi options for String and i64 2024-08-13 12:24:45 +09:30
grpc-plugin rust: bump versions for 24.11 release 2024-12-10 09:37:30 +01:00
renepay ccan/htable: update to explicit DUPS/NODUPS types. 2025-01-21 09:18:25 +10:30
spender spender: fix multifundchannel ids. 2024-11-26 16:04:13 +10:30
src cln-plugin: Change default log level filter back to INFO 2024-09-17 12:00:27 +09:30
test libplugin-pay: trace payment_continue 2024-11-13 13:15:52 +01:00
wss-proxy build: Update poetry.lock files for CLN and built-in plugins 2025-01-15 10:36:43 -08:00
xpay xpay: add maxdelay parameter 2025-01-22 12:19:47 -08:00
.gitignore gitignore: cln-xpay plugin 2024-11-26 21:45:19 +10:30
autoclean.c autoclean: rest between cleanup calls. 2024-11-12 10:42:18 +01:00
bcli.c libplugin: clean up API. 2024-11-07 17:04:35 +10:30
Cargo.toml rust: bump versions for 24.11 release 2024-12-10 09:37:30 +01:00
chanbackup.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
channel_hint.c libplugin-pay: use map for channel hints 2024-10-07 15:16:46 +02:00
channel_hint.h ccan/htable: update to explicit DUPS/NODUPS types. 2025-01-21 09:18:25 +10:30
commando.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
establish_onion_path.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
establish_onion_path.h fetchinvoice: use common/onion_message routines. 2024-07-17 10:57:11 +02:00
exposesecret.c plugins/exposesecret: fix for API change. 2024-11-13 13:24:06 +10:30
fetchinvoice.c fetchinvoice: check better. 2024-11-19 22:54:22 +01:00
fetchinvoice.h plugins/offers: neaten fetchinvoice integration. 2024-07-17 10:57:11 +02:00
funder.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
funder_policy.c common/amount: rename amount_sat_zero/amount_msat_zerp -> amount_sat_is_zero/amount_msat_is_zero. 2024-09-19 12:16:53 +09:30
funder_policy.h libplugin: allow display of default values. 2024-05-15 15:50:54 -05:00
keysend.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
libplugin-pay.c libplugin-pay: trace payment_continue 2024-11-13 13:15:52 +01:00
libplugin-pay.h libplugin-pay: always use a non-NULL struct command. 2024-11-07 17:04:35 +10:30
libplugin.c libplugin: allow aux_command use in init() 2024-11-18 11:03:26 +10:30
libplugin.h libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
Makefile lightningd: simplify injectonionmessage API. 2024-12-05 17:38:16 +10:30
offers.c lightningd: simplify injectonionmessage API. 2024-12-05 17:38:16 +10:30
offers.h plugins: don't check for experimental-offers option: it's the default now. 2024-11-18 10:42:54 +01:00
offers_inv_hook.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
offers_inv_hook.h offers: check they use the blinded path if one is specified. 2024-07-17 10:57:11 +02:00
offers_invreq_hook.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
offers_invreq_hook.h offers: check they use the blinded path if one is specified. 2024-07-17 10:57:11 +02:00
offers_offer.c plugins: don't check for experimental-offers option: it's the default now. 2024-11-18 10:42:54 +01:00
offers_offer.h plugins: move fetchinvoice functionality into offers plugin. 2024-07-17 10:57:11 +02:00
pay.c ccan/htable: update to explicit DUPS/NODUPS types. 2025-01-21 09:18:25 +10:30
README.md doc: fix wording in plugins/README.md 2020-01-06 12:57:59 +01:00
recklessrpc.c libplugin: clean up API. 2024-11-07 17:04:35 +10:30
recover.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
sql.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30
topology.c ccan/htable: update to explicit DUPS/NODUPS types. 2025-01-21 09:18:25 +10:30
txprepare.c libplugin: add method string to jsonrpc callbacks, implement generic helpers. 2024-11-07 17:04:35 +10:30

Plugin Directory

Any file in this directory which is executable and whose name only consists of alphanumeric characters, space, '.', '-' or '_' will be automatically loaded when lightningd starts (unless suppressed with commandline options).