smite: add update_add_htlc message codec#33
Open
kartikangiras wants to merge 1 commit into
Open
Conversation
kushagra0902
reviewed
Apr 4, 2026
c5eb9e3 to
f31a759
Compare
Owner
|
CI doesn't pass |
f31a759 to
b2021d2
Compare
Author
|
@morehouse I have locally tested each command on a linux based machine (it took time because i was on a macbook and it natively does not support these commands). |
morehouse
requested changes
Apr 30, 2026
b2021d2 to
cd6c394
Compare
Author
|
@morehouse I have made all the necessary require changes as reviewed by you. |
morehouse
requested changes
May 4, 2026
| const ONION_PACKET_SIZE: usize = 1366; | ||
|
|
||
| /// TLV type for blinded path key. | ||
| const TLV_BLINDED_PATH: u64 = 3; |
| #[derive(Debug, Clone, Default, PartialEq, Eq)] | ||
| pub struct UpdateAddHtlcTlvs { | ||
| /// Optionally specifies the blinded path key for this HTLC | ||
| pub blinded_path: Option<Vec<u8>>, |
Owner
There was a problem hiding this comment.
This is a point, so we should be using PublicKey as the type.
| let data = &encoded[..encoded.len() - 1]; | ||
| // Should fail because TLV value is truncated | ||
| let decoded = UpdateAddHtlc::decode(data); | ||
| assert!(decoded.is_err()); |
Owner
There was a problem hiding this comment.
We should verify the actual error returned, just like all the other error tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for Message Type: [UPDATE_ADD_HTLC] (type 128).
realtes to #5