Skip to content

Commit

Permalink
Add for channel manager
Browse files Browse the repository at this point in the history
  • Loading branch information
henghonglee committed May 24, 2023
1 parent 26c5832 commit 2c69caf
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 68 deletions.
4 changes: 2 additions & 2 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7762,7 +7762,7 @@ mod tests {
let mut htlc_sig_iter = holder_commitment_tx.htlcs().iter().zip(&holder_commitment_tx.counterparty_htlc_sigs).zip(htlc_sigs.iter().enumerate());

$({
log_trace!(logger, None, Some(self.channel_id), "verifying htlc {}", $htlc_idx);
log_trace!(logger, Some(chan.counterparty_node_id), Some(chan.channel_id), "verifying htlc {}", $htlc_idx);
let remote_signature = Signature::from_der(&hex::decode($counterparty_htlc_sig_hex).unwrap()[..]).unwrap();

let ref htlc = htlcs[$htlc_idx];
Expand Down Expand Up @@ -7795,7 +7795,7 @@ mod tests {
let index = (htlc_sig.1).0;
let channel_parameters = chan.channel_transaction_parameters.as_holder_broadcastable();
let trusted_tx = holder_commitment_tx.trust();
log_trace!(logger, None, Some(self.channel_id), "htlc_tx = {}", hex::encode(serialize(&trusted_tx.get_signed_htlc_tx(&channel_parameters, index, &(htlc_sig.0).1, (htlc_sig.1).1, &preimage))));
log_trace!(logger, Some(chan.counterparty_node_id), Some(chan.channel_id), "htlc_tx = {}", hex::encode(serialize(&trusted_tx.get_signed_htlc_tx(&channel_parameters, index, &(htlc_sig.0).1, (htlc_sig.1).1, &preimage))));
assert_eq!(serialize(&trusted_tx.get_signed_htlc_tx(&channel_parameters, index, &(htlc_sig.0).1, (htlc_sig.1).1, &preimage))[..],
hex::decode($htlc_tx_hex).unwrap()[..], "htlc tx");
})*
Expand Down
Loading

0 comments on commit 2c69caf

Please sign in to comment.