Skip to content

Commit 00bb409

Browse files
committed
Mark PackageSolvingData::HolderHTLCOutput weight unreachable
1 parent db7df42 commit 00bb409

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lightning/src/chain/package.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -546,14 +546,9 @@ impl PackageSolvingData {
546546
PackageSolvingData::RevokedHTLCOutput(ref outp) => outp.weight as usize,
547547
PackageSolvingData::CounterpartyOfferedHTLCOutput(ref outp) => outp.weight as usize,
548548
PackageSolvingData::CounterpartyReceivedHTLCOutput(ref outp) => outp.weight as usize,
549-
PackageSolvingData::HolderHTLCOutput(ref outp) => {
550-
debug_assert!(outp.channel_type_features.supports_anchors_zero_fee_htlc_tx());
551-
if outp.preimage.is_none() {
552-
weight_offered_htlc(&outp.channel_type_features) as usize
553-
} else {
554-
weight_received_htlc(&outp.channel_type_features) as usize
555-
}
556-
},
549+
// Since HolderHLTCOutput requires external funding, we never inquire the witness
550+
// weight of the HTLC transaction here. See OnchainTxHandler::generate_claim.
551+
PackageSolvingData::HolderHTLCOutput(ref _outp) => unreachable!(),
557552
// Since HolderFundingOutput maps to an untractable package that is already signed, its
558553
// weight can be determined from the transaction itself.
559554
PackageSolvingData::HolderFundingOutput(..) => unreachable!(),

0 commit comments

Comments
 (0)