]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix warning about deserialization marker.
authorArik Sosman <git@arik.io>
Sat, 24 Jun 2023 05:35:14 +0000 (22:35 -0700)
committerArik Sosman <git@arik.io>
Sat, 24 Jun 2023 17:52:27 +0000 (10:52 -0700)
Specifically, the legacy deserialization
prevention marker variable was not being
read.

lightning/src/chain/package.rs
lightning/src/ln/chan_utils.rs

index 4576fde02153e2043f0316c509bafa82fa86cb10..9e61cbc4598772c1a9fa8cdd31a2f330dbd8c548 100644 (file)
@@ -247,7 +247,7 @@ impl Readable for CounterpartyOfferedHTLCOutput {
                let mut counterparty_htlc_base_key = RequiredWrapper(None);
                let mut preimage = RequiredWrapper(None);
                let mut htlc = RequiredWrapper(None);
-               let mut legacy_deserialization_prevention_marker: Option<()> = None;
+               let mut _legacy_deserialization_prevention_marker: Option<()> = None;
                let mut channel_type_features = None;
 
                read_tlv_fields!(reader, {
@@ -256,7 +256,7 @@ impl Readable for CounterpartyOfferedHTLCOutput {
                        (4, counterparty_htlc_base_key, required),
                        (6, preimage, required),
                        (8, htlc, required),
-                       (10, legacy_deserialization_prevention_marker, option),
+                       (10, _legacy_deserialization_prevention_marker, option),
                        (11, channel_type_features, option),
                });
 
@@ -321,7 +321,7 @@ impl Readable for CounterpartyReceivedHTLCOutput {
                let mut counterparty_delayed_payment_base_key = RequiredWrapper(None);
                let mut counterparty_htlc_base_key = RequiredWrapper(None);
                let mut htlc = RequiredWrapper(None);
-               let mut legacy_deserialization_prevention_marker: Option<()> = None;
+               let mut _legacy_deserialization_prevention_marker: Option<()> = None;
                let mut channel_type_features = None;
 
                read_tlv_fields!(reader, {
@@ -329,7 +329,7 @@ impl Readable for CounterpartyReceivedHTLCOutput {
                        (2, counterparty_delayed_payment_base_key, required),
                        (4, counterparty_htlc_base_key, required),
                        (6, htlc, required),
-                       (8, legacy_deserialization_prevention_marker, option),
+                       (8, _legacy_deserialization_prevention_marker, option),
                        (9, channel_type_features, option),
                });
 
@@ -399,14 +399,14 @@ impl Readable for HolderHTLCOutput {
                let mut amount_msat = RequiredWrapper(None);
                let mut cltv_expiry = RequiredWrapper(None);
                let mut preimage = None;
-               let mut legacy_deserialization_prevention_marker: Option<()> = None;
+               let mut _legacy_deserialization_prevention_marker: Option<()> = None;
                let mut channel_type_features = None;
 
                read_tlv_fields!(reader, {
                        (0, amount_msat, required),
                        (2, cltv_expiry, required),
                        (4, preimage, option),
-                       (6, legacy_deserialization_prevention_marker, option),
+                       (6, _legacy_deserialization_prevention_marker, option),
                        (7, channel_type_features, option),
                });
 
@@ -460,14 +460,14 @@ impl Writeable for HolderFundingOutput {
 impl Readable for HolderFundingOutput {
        fn read<R: io::Read>(reader: &mut R) -> Result<Self, DecodeError> {
                let mut funding_redeemscript = RequiredWrapper(None);
-               let mut legacy_deserialization_prevention_marker: Option<()> = None;
+               let mut _legacy_deserialization_prevention_marker: Option<()> = None;
                let mut channel_type_features = None;
                let mut funding_amount = None;
 
                read_tlv_fields!(reader, {
                        (0, funding_redeemscript, required),
                        (1, channel_type_features, option),
-                       (2, legacy_deserialization_prevention_marker, option),
+                       (2, _legacy_deserialization_prevention_marker, option),
                        (3, funding_amount, option)
                });
 
index 0f5a453461a921d1072a7d718baa26b7b75972f1..fd27d2308664469034564691395c263adb1808bb 100644 (file)
@@ -938,7 +938,7 @@ impl Readable for ChannelTransactionParameters {
                let mut is_outbound_from_holder = RequiredWrapper(None);
                let mut counterparty_parameters = None;
                let mut funding_outpoint = None;
-               let mut legacy_deserialization_prevention_marker: Option<()> = None;
+               let mut _legacy_deserialization_prevention_marker: Option<()> = None;
                let mut channel_type_features = None;
 
                read_tlv_fields!(reader, {
@@ -947,7 +947,7 @@ impl Readable for ChannelTransactionParameters {
                        (4, is_outbound_from_holder, required),
                        (6, counterparty_parameters, option),
                        (8, funding_outpoint, option),
-                       (10, legacy_deserialization_prevention_marker, option),
+                       (10, _legacy_deserialization_prevention_marker, option),
                        (11, channel_type_features, option),
                });
 
@@ -1363,7 +1363,7 @@ impl Readable for CommitmentTransaction {
                let mut keys = RequiredWrapper(None);
                let mut built = RequiredWrapper(None);
                _init_tlv_field_var!(htlcs, vec_type);
-               let mut legacy_deserialization_prevention_marker: Option<()> = None;
+               let mut _legacy_deserialization_prevention_marker: Option<()> = None;
                let mut channel_type_features = None;
 
                read_tlv_fields!(reader, {
@@ -1374,7 +1374,7 @@ impl Readable for CommitmentTransaction {
                        (8, keys, required),
                        (10, built, required),
                        (12, htlcs, vec_type),
-                       (14, legacy_deserialization_prevention_marker, option),
+                       (14, _legacy_deserialization_prevention_marker, option),
                        (15, channel_type_features, option),
                });