@ -286,7 +286,7 @@ void peer_start_channeld(struct channel *channel,
enum side * fulfilled_sides ;
enum side * fulfilled_sides ;
const struct failed_htlc * * failed_htlcs ;
const struct failed_htlc * * failed_htlcs ;
enum side * failed_sides ;
enum side * failed_sides ;
struct short_channel_id funding_channel_ id;
struct short_channel_id sc id;
u64 num_revocations ;
u64 num_revocations ;
struct lightningd * ld = channel - > peer - > ld ;
struct lightningd * ld = channel - > peer - > ld ;
const struct config * cfg = & ld - > config ;
const struct config * cfg = & ld - > config ;
@ -326,16 +326,16 @@ void peer_start_channeld(struct channel *channel,
& fulfilled_sides , & failed_htlcs , & failed_sides ) ;
& fulfilled_sides , & failed_htlcs , & failed_sides ) ;
if ( channel - > scid ) {
if ( channel - > scid ) {
funding_channel_ id = * channel - > scid ;
sc id = * channel - > scid ;
reached_announce_depth
/* Subtle: depth=1 at funding height. */
= ( short_channel_id_blocknum ( & funding_channel_id )
reached_announce_depth = get_block_height ( ld - > topology ) + 1 > =
+ ANNOUNCE_MIN_DEPTH < = get_block_height ( ld - > topology ) ) ;
short_channel_id_blocknum ( & scid ) + ANNOUNCE_MIN_DEPTH ;
log_debug ( channel - > log , " Already have funding locked in%s " ,
log_debug ( channel - > log , " Already have funding locked in%s " ,
reached_announce_depth
reached_announce_depth
? " (and ready to announce) " : " " ) ;
? " (and ready to announce) " : " " ) ;
} else {
} else {
log_debug ( channel - > log , " Waiting for funding confirmations " ) ;
log_debug ( channel - > log , " Waiting for funding confirmations " ) ;
memset ( & funding_channel_ id, 0 , sizeof ( funding_channel_ id) ) ;
memset ( & sc id, 0 , sizeof ( sc id) ) ;
reached_announce_depth = false ;
reached_announce_depth = false ;
}
}
@ -411,7 +411,7 @@ void peer_start_channeld(struct channel *channel,
failed_htlcs , failed_sides ,
failed_htlcs , failed_sides ,
channel - > scid ! = NULL ,
channel - > scid ! = NULL ,
channel - > remote_funding_locked ,
channel - > remote_funding_locked ,
& funding_channel_ id,
& sc id,
reconnected ,
reconnected ,
channel - > state = = CHANNELD_SHUTTING_DOWN ,
channel - > state = = CHANNELD_SHUTTING_DOWN ,
channel - > remote_shutdown_scriptpubkey ! = NULL ,
channel - > remote_shutdown_scriptpubkey ! = NULL ,