@ -201,6 +201,13 @@ static void init_half_chan(struct routing_state *rstate,
c - > last_timestamp = time_now ( ) . ts . tv_sec - rstate - > prune_timeout / 2 ;
c - > last_timestamp = time_now ( ) . ts . tv_sec - rstate - > prune_timeout / 2 ;
}
}
static void bad_gossip_order ( const u8 * msg , const char * details )
{
status_trace ( " Bad gossip order: %s before announcement %s " ,
wire_type_name ( fromwire_peektype ( msg ) ) ,
details ) ;
}
struct chan * new_chan ( struct routing_state * rstate ,
struct chan * new_chan ( struct routing_state * rstate ,
const struct short_channel_id * scid ,
const struct short_channel_id * scid ,
const struct pubkey * id1 ,
const struct pubkey * id1 ,
@ -1015,9 +1022,12 @@ u8 *handle_channel_update(struct routing_state *rstate, const u8 *update)
}
}
if ( ! chan ) {
if ( ! chan ) {
SUPERVERBOSE ( " Ignoring update for unknown channel %s " ,
bad_gossip_order ( serialized ,
type_to_string ( tmpctx , struct short_channel_id ,
tal_fmt ( tmpctx , " %s(%u) " ,
& short_channel_id ) ) ;
type_to_string ( tmpctx ,
struct short_channel_id ,
& short_channel_id ) ,
flags ) ) ;
return NULL ;
return NULL ;
}
}
}
}
@ -1245,11 +1255,9 @@ u8 *handle_node_announcement(struct routing_state *rstate, const u8 *node_ann)
pna = pending_node_map_get ( rstate - > pending_node_map ,
pna = pending_node_map_get ( rstate - > pending_node_map ,
& node_id . pubkey ) ;
& node_id . pubkey ) ;
if ( ! pna ) {
if ( ! pna ) {
SUPERVERBOSE ( " Node not found, was the node_announcement "
bad_gossip_order ( serialized ,
" for node %s preceded by at least "
type_to_string ( tmpctx , struct pubkey ,
" channel_announcement? " ,
& node_id ) ) ;
type_to_string ( tmpctx , struct pubkey ,
& node_id ) ) ;
} else if ( pna - > timestamp < timestamp ) {
} else if ( pna - > timestamp < timestamp ) {
SUPERVERBOSE (
SUPERVERBOSE (
" Deferring node_announcement for node %s " ,
" Deferring node_announcement for node %s " ,
@ -1519,6 +1527,9 @@ void handle_local_add_channel(struct routing_state *rstate, const u8 *msg)
return ;
return ;
}
}
status_trace ( " local_add_channel %s " ,
type_to_string ( tmpctx , struct short_channel_id , & scid ) ) ;
/* Create new (unannounced) channel */
/* Create new (unannounced) channel */
new_chan ( rstate , & scid , & rstate - > local_id , & remote_node_id ) ;
new_chan ( rstate , & scid , & rstate - > local_id , & remote_node_id ) ;
}
}