mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
test_lightningd.py: fix obscure corner case in gossip.
I actually hit this very hard to reproduce race: if we haven't process the channeld message when block #6 comes in, we won't send the gossip message. We wait for logs, but don't generate new blocks, and timeout on l1.daemon.wait_for_log('peer_out WIRE_ANNOUNCEMENT_SIGNATURES'). The solution, which also tests that we don't send announcement signatures immediately, is to generate a single block, wait for CHANNELD_NORMAL, then (in gossip tests), generate 5 more. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -662,6 +662,10 @@ static enum watch_result funding_announce_cb(struct peer *peer,
|
||||
return KEEP_WATCHING;
|
||||
}
|
||||
if (peer->state != CHANNELD_NORMAL || !peer->owner) {
|
||||
log_debug(peer->ld->log,
|
||||
"Funding tx announce ready, but peer state %s %s",
|
||||
peer_state_name(peer->state),
|
||||
peer->owner ? peer->owner->name : "unowned");
|
||||
return KEEP_WATCHING;
|
||||
}
|
||||
subd_send_msg(peer->owner,
|
||||
|
||||
Reference in New Issue
Block a user