Browse Source

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>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
10b40c524d
  1. 20
      gossipd/routing.c

20
gossipd/routing.c

@ -744,18 +744,20 @@ void handle_channel_update(struct routing_state *rstate, const u8 *update)
&short_channel_id),
flags & 0x01);
if (update_to_pending(rstate, &short_channel_id, serialized)) {
status_trace("Deferring update for pending channel %s",
type_to_string(trc, struct short_channel_id,
&short_channel_id));
tal_free(tmpctx);
return;
}
c = get_connection_by_scid(rstate, &short_channel_id, flags & 0x1);
if (!c) {
if (update_to_pending(rstate, &short_channel_id, serialized)) {
status_trace("Deferring update for pending channel %s",
type_to_string(trc, struct short_channel_id,
&short_channel_id));
} else {
status_trace("Ignoring update for unknown channel %s",
type_to_string(trc, struct short_channel_id,
&short_channel_id));
}
status_trace("Ignoring update for unknown channel %s",
type_to_string(trc, struct short_channel_id,
&short_channel_id));
tal_free(tmpctx);
return;
} else if (c->last_timestamp >= timestamp) {

Loading…
Cancel
Save