lightning/wallet/test
Rusty Russell 01a8d2b01a lightningd: send announcement_signatures once channel is ready, don't wait until 6 deep.
The spec used to say you had to wait for channel to be ready, *and* 6
depth before exchanging signatures.  Now the 6 depth requirement is only
on the actual announcing of the channel: you can send sigs any time.

This means our state machine goes from:

  NOT_USABLE -> NOT_DEEP_ENOUGH -> NEED_PEER_SIGS -> ANNOUNCED

to:

  NOT_USABLE -> NEED_PEER_SIGS -> NOT_DEEP_ENOUGH -> ANNOUNCED

However, this revealed that our state machine is insufficient, so
rework it to be more general and understandable.  In particular,
check for unexpected state transitions, and thus document them.

Note that cg->sent_sigs replaces channel->replied_to_announcement_sigs,
too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Protocol: We now exchange `announcement_signatures` as soon as we're ready, rather than waiting for 6 blocks (as per recent BOLT update)
2025-05-15 16:40:33 +09:30
..
.gitignore wallet: move tests into test/ dir like other unit tests. 2017-12-13 22:46:10 +01:00
Makefile db: Instrument the DB interactions to trace their execution 2024-11-18 17:46:40 +01:00
run-db.c lightningd: keep closed channels in memory. 2025-04-29 13:31:23 +09:30
run-psbt_fixup.c wallet/test/run-psbt_fixup.c: test for psbt fixups. 2023-03-31 09:16:25 +10:30
run-wallet.c lightningd: send announcement_signatures once channel is ready, don't wait until 6 deep. 2025-05-15 16:40:33 +09:30
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