core-lightning/wallet/test
Rusty Russell 41b379ed89 lightningd: hand fds to connectd, not receive them from connectd.
Before this patch:
1. connectd says it's connected (peer_connected)
2. we tell connectd we want to talk about each channel (peer_make_active)
3. connectd gives us an fd for each channel, and we connect it to a subd (peer_active)
4. OR, connectd says it sent something about a channel we didn't tell it about, with an fd (peer_active)

Now:
1. connectd says it's connected (peer_connected)
2. we start all appropriate subds and tell connectd to what channels/fds (peer_connect_subd).
3. if connectd says it sent something about a channel we didn't tell it about, we either tell
   it to hang up (peer_final_msg), or connect a new opening daemon (peer_connect_subd).

This is the minimal-size patch, which is why we create socket pairs in
so many places to use the existing functions.  Many cleanups are
possible, since the new flow is so simple.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-07-18 20:50:04 -05:00
..
.gitignore wallet: move tests into test/ dir like other unit tests. 2017-12-13 22:46:10 +01:00
Makefile hsmd: Augment call to hsmd_sign_withdrawal_tx with wallet index metadata 2022-03-10 10:22:29 +10:30
run-db.c unit tests: don't crash if !HAVE_SQLITE3. 2022-03-30 14:20:56 +10:30
run-wallet.c lightningd: hand fds to connectd, not receive them from connectd. 2022-07-18 20:50:04 -05:00
test_utils.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
test_utils.h check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30