Skip to content

smite: add commitment_signed codec - #167

Merged
morehouse merged 1 commit into
morehouse:masterfrom
NishantBansal2003:commit-sign-codec
Jul 31, 2026
Merged

smite: add commitment_signed codec#167
morehouse merged 1 commit into
morehouse:masterfrom
NishantBansal2003:commit-sign-codec

Conversation

@NishantBansal2003

Copy link
Copy Markdown
Contributor

ref: #111

Comment on lines +49 to +54
u16::try_from(self.htlc_signatures.len())
.expect("number of HTLC signatures must not exceed u16::MAX")
.write(&mut out);
for htlc_signature in &self.htlc_signatures {
htlc_signature.write(&mut out);
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I inlined the Vec<Signature> encode/decode logic since no other wire messages share this type, so I didn't think it made sense to implement WireFormat for it

Let me know if you'd prefer consistency here and would rather have WireFormat implemented instead

@erickcestari erickcestari left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a very small nit that would be fine if not addressed.

Comment thread smite/src/bolt.rs Outdated
Comment thread smite/src/bolt/commitment_signed.rs Outdated
Comment thread smite/src/bolt/commitment_signed.rs Outdated
Comment thread smite/src/bolt/commitment_signed.rs Outdated
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
@morehouse
morehouse merged commit 98df83c into morehouse:master Jul 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants