mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
channeld: fix conditions under which we can send a channel update.
The condition in send_channel_update is wrong: it needs to match the conditions under which we send announcements. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
c546b1bbb6
commit
00d4c04208
@@ -349,9 +349,9 @@ static void send_channel_update(struct peer *peer, bool peer_too,
|
|||||||
|
|
||||||
assert(disable_flag == 0 || disable_flag == ROUTING_FLAGS_DISABLED);
|
assert(disable_flag == 0 || disable_flag == ROUTING_FLAGS_DISABLED);
|
||||||
|
|
||||||
/* If we don't have funding_locked both sides, we can't have told
|
/* Only send an update if we sent a temporary or real announcement */
|
||||||
* gossipd or created update. */
|
if (!peer->sent_temporary_announce
|
||||||
if (!peer->funding_locked[LOCAL] || !peer->funding_locked[REMOTE])
|
&& !(peer->have_sigs[LOCAL] && peer->have_sigs[REMOTE]))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
msg = create_channel_update(tmpctx, peer, disable_flag);
|
msg = create_channel_update(tmpctx, peer, disable_flag);
|
||||||
@@ -508,8 +508,8 @@ static void channel_announcement_negotiate(struct peer *peer)
|
|||||||
* a local update */
|
* a local update */
|
||||||
if (!peer->announce_depth_reached) {
|
if (!peer->announce_depth_reached) {
|
||||||
if (!peer->sent_temporary_announce) {
|
if (!peer->sent_temporary_announce) {
|
||||||
send_temporary_announcement(peer);
|
|
||||||
peer->sent_temporary_announce = true;
|
peer->sent_temporary_announce = true;
|
||||||
|
send_temporary_announcement(peer);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user