mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
gossipd: attach updates to pending transactions in preference.
Otherwise, we otherwise end up with out-of-order updates (ie. preceeding announcements). I assume that is because of the locally-inserted connections. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
96ed75d8b2
commit
10b40c524d
1 changed files with 11 additions and 9 deletions
|
@ -744,18 +744,20 @@ void handle_channel_update(struct routing_state *rstate, const u8 *update)
|
||||||
&short_channel_id),
|
&short_channel_id),
|
||||||
flags & 0x01);
|
flags & 0x01);
|
||||||
|
|
||||||
c = get_connection_by_scid(rstate, &short_channel_id, flags & 0x1);
|
|
||||||
|
|
||||||
if (!c) {
|
|
||||||
if (update_to_pending(rstate, &short_channel_id, serialized)) {
|
if (update_to_pending(rstate, &short_channel_id, serialized)) {
|
||||||
status_trace("Deferring update for pending channel %s",
|
status_trace("Deferring update for pending channel %s",
|
||||||
type_to_string(trc, struct short_channel_id,
|
type_to_string(trc, struct short_channel_id,
|
||||||
&short_channel_id));
|
&short_channel_id));
|
||||||
} else {
|
tal_free(tmpctx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
c = get_connection_by_scid(rstate, &short_channel_id, flags & 0x1);
|
||||||
|
|
||||||
|
if (!c) {
|
||||||
status_trace("Ignoring update for unknown channel %s",
|
status_trace("Ignoring update for unknown channel %s",
|
||||||
type_to_string(trc, struct short_channel_id,
|
type_to_string(trc, struct short_channel_id,
|
||||||
&short_channel_id));
|
&short_channel_id));
|
||||||
}
|
|
||||||
tal_free(tmpctx);
|
tal_free(tmpctx);
|
||||||
return;
|
return;
|
||||||
} else if (c->last_timestamp >= timestamp) {
|
} else if (c->last_timestamp >= timestamp) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue