You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add HTLC/extra data in LocalCommitmentTransaction from construction
1107ab0 introduced some additional
metadata, including per-HTLC data in LocalCommitmentTransaction. To
keep diff reasonable it did so in ChannelMonitor after the
LocalCommitmentTransaction had been constructed and passed over the
wall, but there's little reason to do so - we should just be
constructing them with the data from the start, filled in by Channel.
This cleans up some internal interfaces a bit, slightly reduces
some data duplication and moves us one step forward to exposing
the guts of LocalCommitmentTransaction publicly in a sensible way.
if !this_htlc.0.offered && preimage.is_none(){return;}// if we don't have preimage for HTLC-Success, don't try to generate
616
615
let htlc_secret = if !this_htlc.0.offered{ preimage }else{None};// if we have a preimage for HTLC-Timeout, don't use it that's likely a duplicate HTLC hash
617
616
if this_htlc.1.is_none(){return;}// we don't have any remote signature for this htlc
618
617
if htlc_tx.input.len() != 1{return;}
619
618
if htlc_tx.input[0].witness.len() != 0{return;}
620
619
621
-
let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc.0,&local_keys.a_htlc_key,&local_keys.b_htlc_key,&local_keys.revocation_key);
620
+
let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc.0,&self.local_keys.a_htlc_key,&self.local_keys.b_htlc_key,&self.local_keys.revocation_key);
0 commit comments