Skip to content

Commit bddd5c7

Browse files
committed
Use proper TLV type for CommitmentSigned::funding_txid
Now that we are sure we will be moving forward with the `funding_txid` TLV, we use the TLV type as mandated per the spec.
1 parent 7a53d67 commit bddd5c7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lightning/src/ln/msgs.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,8 +2983,7 @@ impl_writeable_msg!(CommitmentSigned, {
29832983
signature,
29842984
htlc_signatures
29852985
}, {
2986-
// TOOD(splicing): Change this to 1 once the spec is finalized
2987-
(1001, funding_txid, option),
2986+
(1, funding_txid, option),
29882987
});
29892988

29902989
#[cfg(taproot)]
@@ -2993,9 +2992,8 @@ impl_writeable_msg!(CommitmentSigned, {
29932992
signature,
29942993
htlc_signatures
29952994
}, {
2995+
(1, funding_txid, option),
29962996
(2, partial_signature_with_nonce, option),
2997-
// TOOD(splicing): Change this to 1 and reorder once the spec is finalized
2998-
(1001, funding_txid, option),
29992997
});
30002998

30012999
impl_writeable!(DecodedOnionErrorPacket, {
@@ -5959,7 +5957,7 @@ mod tests {
59595957
} else {
59605958
target_value += "0000";
59615959
}
5962-
target_value += "fd03e9"; // Type (funding_txid)
5960+
target_value += "01"; // Type (funding_txid)
59635961
target_value += "20"; // Length (funding_txid)
59645962
target_value += "6e96fe9f8b0ddcd729ba03cfafa5a27b050b39d354dd980814268dfa9a44d4c2"; // Value
59655963
assert_eq!(encoded_value.as_hex().to_string(), target_value);

0 commit comments

Comments
 (0)