@ -78,7 +78,8 @@ static bool htlc_in_update_state(struct channel *channel,
wallet_htlc_update ( channel - > peer - > ld - > wallet ,
wallet_htlc_update ( channel - > peer - > ld - > wallet ,
hin - > dbid , newstate , hin - > preimage ,
hin - > dbid , newstate , hin - > preimage ,
hin - > badonion , hin - > failonion , NULL ) ;
hin - > badonion , hin - > failonion , NULL ,
hin - > we_filled ) ;
hin - > hstate = newstate ;
hin - > hstate = newstate ;
return true ;
return true ;
@ -94,7 +95,7 @@ static bool htlc_out_update_state(struct channel *channel,
wallet_htlc_update ( channel - > peer - > ld - > wallet , hout - > dbid , newstate ,
wallet_htlc_update ( channel - > peer - > ld - > wallet , hout - > dbid , newstate ,
hout - > preimage , 0 , hout - > failonion ,
hout - > preimage , 0 , hout - > failonion ,
hout - > failmsg ) ;
hout - > failmsg , false ) ;
hout - > hstate = newstate ;
hout - > hstate = newstate ;
return true ;
return true ;
@ -187,7 +188,7 @@ static void failmsg_update_reply(struct subd *gossipd,
cbdata - > hin - > dbid , cbdata - > hin - > hstate ,
cbdata - > hin - > dbid , cbdata - > hin - > hstate ,
cbdata - > hin - > preimage ,
cbdata - > hin - > preimage ,
cbdata - > hin - > badonion ,
cbdata - > hin - > badonion ,
cbdata - > hin - > failonion , NULL ) ;
cbdata - > hin - > failonion , NULL , false ) ;
failed_htlc = mk_failed_htlc ( tmpctx ,
failed_htlc = mk_failed_htlc ( tmpctx ,
cbdata - > hin , cbdata - > hin - > failonion ) ;
cbdata - > hin , cbdata - > hin - > failonion ) ;
@ -850,6 +851,7 @@ htlc_accepted_hook_try_resolve(struct htlc_accepted_hook_payload *request,
towire_u16 ( & unknown_details , 0x400f ) ;
towire_u16 ( & unknown_details , 0x400f ) ;
local_fail_in_htlc ( hin , take ( unknown_details ) ) ;
local_fail_in_htlc ( hin , take ( unknown_details ) ) ;
} else {
} else {
hin - > we_filled = true ;
fulfill_htlc ( hin , payment_preimage ) ;
fulfill_htlc ( hin , payment_preimage ) ;
}
}
}
}
@ -1247,7 +1249,7 @@ static void fulfill_our_htlc_out(struct channel *channel, struct htlc_out *hout,
wallet_htlc_update ( ld - > wallet , hout - > dbid , hout - > hstate ,
wallet_htlc_update ( ld - > wallet , hout - > dbid , hout - > hstate ,
hout - > preimage , 0 , hout - > failonion ,
hout - > preimage , 0 , hout - > failonion ,
hout - > failmsg ) ;
hout - > failmsg , false ) ;
/* Update channel stats */
/* Update channel stats */
wallet_channel_stats_incr_out_fulfilled ( ld - > wallet ,
wallet_channel_stats_incr_out_fulfilled ( ld - > wallet ,
channel - > dbid ,
channel - > dbid ,
@ -1416,7 +1418,7 @@ void onchain_failed_our_htlc(const struct channel *channel,
htlc_out_check ( hout , __func__ ) ;
htlc_out_check ( hout , __func__ ) ;
wallet_htlc_update ( ld - > wallet , hout - > dbid , hout - > hstate ,
wallet_htlc_update ( ld - > wallet , hout - > dbid , hout - > hstate ,
hout - > preimage , 0 , hout - > failonion ,
hout - > preimage , 0 , hout - > failonion ,
hout - > failmsg ) ;
hout - > failmsg , false ) ;
if ( hout - > am_origin ) {
if ( hout - > am_origin ) {
assert ( why ! = NULL ) ;
assert ( why ! = NULL ) ;