Skip to content

Commit 2d7ce22

Browse files
committed
f Fix build due to depending on one line of diff from the next commit + 1.22 issues
1 parent 7fa3019 commit 2d7ce22

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lightning/src/ln/chan_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ pub struct LocalCommitmentTransaction {
487487
tx: Transaction,
488488
pub(crate) local_keys: TxCreationKeys,
489489
pub(crate) feerate_per_kw: u64,
490-
per_htlc: Vec<(HTLCOutputInCommitment, Option<Signature>, Option<Transaction>)>
490+
pub(crate) per_htlc: Vec<(HTLCOutputInCommitment, Option<Signature>)>,
491491
}
492492
impl LocalCommitmentTransaction {
493493
#[cfg(test)]

lightning/src/ln/onchaintx.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
830830
if let Ok(sigs) = self.key_storage.sign_local_commitment_htlc_transactions(local_commitment, self.local_csv, &self.secp_ctx) {
831831
self.local_htlc_sigs = Some(Vec::new());
832832
let ret = self.local_htlc_sigs.as_mut().unwrap();
833-
for (htlc_idx, (local_sig, (htlc, _))) in sigs.iter().zip(local_commitment.per_htlc.iter()).enumerate() {
833+
for (htlc_idx, (local_sig, &(ref htlc, _))) in sigs.iter().zip(local_commitment.per_htlc.iter()).enumerate() {
834834
if let Some(tx_idx) = htlc.transaction_output_index {
835835
if ret.len() <= tx_idx as usize { ret.resize(tx_idx as usize + 1, None); }
836836
ret[tx_idx as usize] = Some((htlc_idx, local_sig.expect("Did not receive a signature for a non-dust HTLC")));
@@ -846,7 +846,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
846846
if let Ok(sigs) = self.key_storage.sign_local_commitment_htlc_transactions(local_commitment, self.local_csv, &self.secp_ctx) {
847847
self.prev_local_htlc_sigs = Some(Vec::new());
848848
let ret = self.prev_local_htlc_sigs.as_mut().unwrap();
849-
for (htlc_idx, (local_sig, (htlc, _))) in sigs.iter().zip(local_commitment.per_htlc.iter()).enumerate() {
849+
for (htlc_idx, (local_sig, &(ref htlc, _))) in sigs.iter().zip(local_commitment.per_htlc.iter()).enumerate() {
850850
if let Some(tx_idx) = htlc.transaction_output_index {
851851
if ret.len() <= tx_idx as usize { ret.resize(tx_idx as usize + 1, None); }
852852
ret[tx_idx as usize] = Some((htlc_idx, local_sig.expect("Did not receive a signature for a non-dust HTLC")));
@@ -893,7 +893,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
893893
if commitment_txid == outp.txid {
894894
self.sign_latest_local_htlcs();
895895
if let &Some(ref htlc_sigs) = &self.local_htlc_sigs {
896-
let (htlc_idx, htlc_sig) = htlc_sigs[outp.vout as usize].as_ref().unwrap();
896+
let &(ref htlc_idx, ref htlc_sig) = htlc_sigs[outp.vout as usize].as_ref().unwrap();
897897
htlc_tx = Some(self.local_commitment.as_ref().unwrap()
898898
.get_signed_htlc_tx(*htlc_idx, htlc_sig, preimage, self.local_csv));
899899
}
@@ -904,7 +904,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
904904
if commitment_txid == outp.txid {
905905
self.sign_prev_local_htlcs();
906906
if let &Some(ref htlc_sigs) = &self.prev_local_htlc_sigs {
907-
let (htlc_idx, htlc_sig) = htlc_sigs[outp.vout as usize].as_ref().unwrap();
907+
let &(ref htlc_idx, ref htlc_sig) = htlc_sigs[outp.vout as usize].as_ref().unwrap();
908908
htlc_tx = Some(self.prev_local_commitment.as_ref().unwrap()
909909
.get_signed_htlc_tx(*htlc_idx, htlc_sig, preimage, self.local_csv));
910910
}

0 commit comments

Comments
 (0)