Skip to content

Align LightBlockFromProto with its doc comment#3460

Merged
masih merged 4 commits into
mainfrom
masih/lightblock-docs
May 19, 2026
Merged

Align LightBlockFromProto with its doc comment#3460
masih merged 4 commits into
mainfrom
masih/lightblock-docs

Conversation

@masih
Copy link
Copy Markdown
Collaborator

@masih masih commented May 18, 2026

The doc comment for LightBlockFromProto promises an error when either the validator set or the signed header is invalid. The implementation, however, treated nil sub-fields as optional and returned a partially populated LightBlock. Honor the documented contract so callers can rely on err == nil meaning the returned LightBlock is fully populated.

Also fix the "Lightblock" -> "LightBlock" typo in the same comment.

@masih masih marked this pull request as ready for review May 18, 2026 18:51
@masih masih requested review from sei-will and wen-coding May 18, 2026 18:51
@cursor

This comment was marked as off-topic.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 19, 2026, 8:35 AM

Comment thread sei-tendermint/types/light.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 76.31579% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.31%. Comparing base (5ac709d) to head (04a8155).

Files with missing lines Patch % Lines
sei-tendermint/types/light.go 76.31% 8 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3460   +/-   ##
=======================================
  Coverage   59.30%   59.31%           
=======================================
  Files        2127     2127           
  Lines      175876   175832   -44     
=======================================
- Hits       104305   104294   -11     
+ Misses      62473    62458   -15     
+ Partials     9098     9080   -18     
Flag Coverage Δ
sei-chain-pr 81.56% <76.31%> (?)
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-tendermint/types/light.go 78.43% <76.31%> (-1.77%) ⬇️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The doc comment for LightBlockFromProto promises an error when
either the validator set or the signed header is invalid. The
implementation, however, treated nil sub-fields as optional and
returned a partially populated LightBlock. Honor the documented
contract so callers can rely on err == nil meaning the returned
LightBlock is fully populated.

Also fix the "Lightblock" -> "LightBlock" typo in the same comment.
@masih masih force-pushed the masih/lightblock-docs branch from 3f9b7c8 to 1b8b90e Compare May 18, 2026 19:02
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1b8b90e. Configure here.

Comment thread sei-tendermint/types/light.go
@masih masih added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 1b89b44 May 19, 2026
42 checks passed
@masih masih deleted the masih/lightblock-docs branch May 19, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants