Christian Decker
50a0321759
pay: Use the global channel_hint_set
and remember across payments
2024-10-07 14:05:47 +02:00
Rusty Russell
5052f0763f
gossmap: keep capacity for locally-generated channels as well.
...
It was weird not to have a capacity associated with localmods channels, and
fixing it has some very nice side effects.
Now the gossmap_chan_get_capacity() call never fails (we prevented reading
of channels from gossmap in the partially-written case already), so we
make it return the capacity. We do this in msat, because that's what
all the callers want.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-04 11:27:53 +09:30
Rusty Russell
e0e879c003
common: remove type_to_string files altogther.
...
This means including <common/utils.h> where it was indirectly included.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-20 13:51:48 +10:30
Rusty Russell
65efa2ab18
common, pay: actually test Dijkstra and route finding.
...
Set up a simple line of channel pairs, where one should be preferred
over the other for our various reasons. Make sure this works, both
using a low-level call to Dijkstra and at a higher level as the pay
plugin does.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-07 14:09:14 +01:00
Rusty Russell
3e672b784d
Makefile: use a library archive for CCAN
...
The linker discards whole files in an archive if it doesn't need them,
so saves a bit of space (and time). Also allows us to add more niche
things to CCAN (e.g. runes support!) without bloating all the binaries.
We also had many places which depended on $(CCAN_FILES), but that was
already a dependent of $(ALL_PROGRAMS) and $(ALL_TEST_PROGRAMS).
Before:
```
$ size lightningd/lightning*d
text data bss dec hex filename
2247683 8696 39008 2295387 23065b lightningd/lightning_channeld
2086607 7432 38880 2132919 208bb7 lightningd/lightning_closingd
2227916 8056 39200 2275172 22b764 lightningd/lightning_connectd
3369236 119288 39240 3527764 35d454 lightningd/lightningd
2183551 8352 38880 2230783 2209ff lightningd/lightning_dualopend
2196389 8024 39136 2243549 223bdd lightningd/lightning_gossipd
2086216 7488 39264 2132968 208be8 lightningd/lightning_hsmd
2134396 8136 39424 2181956 214b44 lightningd/lightning_onchaind
2133391 8352 38880 2180623 21460f lightningd/lightning_openingd
1512168 2136 34384 1548688 17a190 lightningd/lightning_websocketd
```
After:
```
text data bss dec hex filename
2192065 8488 38912 2239465 222be9 lightningd/lightning_channeld
2030957 7224 38816 2076997 1fb145 lightningd/lightning_closingd
2179571 7968 39104 2226643 21f9d3 lightningd/lightning_connectd
3354296 119288 39208 3512792 3599d8 lightningd/lightningd
2127933 8144 38816 2174893 212fad lightningd/lightning_dualopend
2141699 7856 39072 2188627 216553 lightningd/lightning_gossipd
2024482 7288 5240 2037010 1f1512 lightningd/lightning_hsmd
2072074 7920 5400 2085394 1fd212 lightningd/lightning_onchaind
2077773 8144 38816 2124733 206bbd lightningd/lightning_openingd
1408958 1752 344 1411054 1587ee lightningd/lightning_websocketd
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-07-17 08:51:02 +09:30
Rusty Russell
24536c5561
common/autodata: use instead of ccan/autodata
...
This means it needs to be linked ~everywhere.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-21 18:04:43 +02:00
Rusty Russell
a027b3a80c
plugins/test/Makefile: fix typo causing build race.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-27 20:28:49 +09:30
Rusty Russell
7ef6dd04d9
plugins/test/run-route-overlong: modern overlong routing test.
...
gossmap equivalent of gossipd/test/run-overlong.c.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-22 17:53:04 +09:30
Rusty Russell
25b5e1e099
update-mocks: make sure we cover all test programs.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-22 17:53:04 +09:30
niftynei
2538956b4d
funder-test: tests for our policy configurations
2021-05-03 11:06:10 +09:30