Skip to content

Commit 4125c64

Browse files
committed
f drop onchain amount in IrrevocableResolvedHTLC
1 parent 9d0883b commit 4125c64

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,6 @@ struct IrrevocablyResolvedHTLC {
589589
/// The txid of the transaction which resolved the HTLC, this may be a commitment,
590590
/// HTLC-Success, or HTLC-Timeout transaction.
591591
resolving_txid: Option<Txid>,
592-
/// The amount of the output for this HTLC in `resolving_txid`.
593-
onchain_value_satoshis: Option<u64>,
594592
/// Only set if the HTLC claim was ours using a payment preimage
595593
payment_preimage: Option<PaymentPreimage>,
596594
}
@@ -599,7 +597,6 @@ impl_writeable_tlv_based!(IrrevocablyResolvedHTLC, {
599597
(0, commitment_tx_output_idx, required),
600598
(1, resolving_txid, option),
601599
(2, payment_preimage, option),
602-
(3, onchain_value_satoshis, option),
603600
});
604601

605602
/// A ChannelMonitor handles chain events (blocks connected and disconnected) and generates
@@ -2704,7 +2701,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
27042701
if let Some(idx) = commitment_tx_output_idx {
27052702
self.htlcs_resolved_on_chain.push(IrrevocablyResolvedHTLC {
27062703
commitment_tx_output_idx: idx, resolving_txid: Some(entry.txid),
2707-
payment_preimage: None, onchain_value_satoshis,
2704+
payment_preimage: None,
27082705
});
27092706
}
27102707
},
@@ -2714,10 +2711,11 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
27142711
outputs: vec![descriptor]
27152712
});
27162713
},
2717-
OnchainEvent::HTLCSpendConfirmation { commitment_tx_output_idx, preimage, onchain_value_satoshis, .. } => {
2714+
OnchainEvent::HTLCSpendConfirmation { commitment_tx_output_idx, preimage, .. } => {
27182715
self.htlcs_resolved_on_chain.push(IrrevocablyResolvedHTLC {
27192716
commitment_tx_output_idx, resolving_txid: Some(entry.txid),
2720-
payment_preimage: preimage, onchain_value_satoshis });
2717+
payment_preimage: preimage,
2718+
});
27212719
},
27222720
OnchainEvent::FundingSpendConfirmation { commitment_tx_to_counterparty_output, .. } => {
27232721
self.funding_spend_confirmed = Some(entry.txid);

0 commit comments

Comments
 (0)