Skip to content

Commit cd16cdd

Browse files
authored
Merge pull request #2571 from davidcaseria/htlc-descriptor-writeable
Make HTLCDescriptor writeable
2 parents 24db35e + 808a51e commit cd16cdd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lightning/src/events/bump_transaction.rs

+16
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ pub struct ChannelDerivationParameters {
5757
pub transaction_parameters: ChannelTransactionParameters,
5858
}
5959

60+
impl_writeable_tlv_based!(ChannelDerivationParameters, {
61+
(0, value_satoshis, required),
62+
(2, keys_id, required),
63+
(4, transaction_parameters, required),
64+
});
65+
6066
/// A descriptor used to sign for a commitment transaction's anchor output.
6167
#[derive(Clone, Debug, PartialEq, Eq)]
6268
pub struct AnchorDescriptor {
@@ -139,6 +145,16 @@ pub struct HTLCDescriptor {
139145
pub counterparty_sig: Signature
140146
}
141147

148+
impl_writeable_tlv_based!(HTLCDescriptor, {
149+
(0, channel_derivation_parameters, required),
150+
(2, commitment_txid, required),
151+
(4, per_commitment_number, required),
152+
(6, per_commitment_point, required),
153+
(8, htlc, required),
154+
(10, preimage, option),
155+
(12, counterparty_sig, required),
156+
});
157+
142158
impl HTLCDescriptor {
143159
/// Returns the outpoint of the HTLC output in the commitment transaction. This is the outpoint
144160
/// being spent by the HTLC input in the HTLC transaction.

0 commit comments

Comments
 (0)