Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove count from spare share splitter #911

Merged
merged 4 commits into from
Oct 31, 2022

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Oct 24, 2022

@rootulp rootulp self-assigned this Oct 24, 2022
Comment on lines -140 to -150
func TestMsgShareContainsInfoByte(t *testing.T) {
sss := NewSparseShareSplitter()
smallMsg := generateRandomMessage(appconsts.SparseShareContentSize / 2)
sss.Write(smallMsg)

shares := sss.Export()

got := shares[0][appconsts.NamespaceSize : appconsts.NamespaceSize+appconsts.ShareInfoBytes][0]

isSequenceStart := true
want, err := NewInfoByte(appconsts.ShareVersion, isSequenceStart)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Apologies for including a refactor to the info byte tests while implementing TestSparseShareSplitterCount. The refactor can be extracted to a separate PR if requested.

@rootulp rootulp marked this pull request as ready for review October 25, 2022 07:52
@codecov-commenter
Copy link

Codecov Report

Merging #911 (d7eb44c) into main (457a207) will increase coverage by 0.00%.
The diff coverage is 25.00%.

@@           Coverage Diff           @@
##             main     #911   +/-   ##
=======================================
  Coverage   26.09%   26.09%           
=======================================
  Files          77       77           
  Lines        9344     9341    -3     
=======================================
  Hits         2438     2438           
+ Misses       6677     6674    -3     
  Partials      229      229           
Impacted Files Coverage Δ
pkg/shares/split_sparse_shares.go 70.00% <25.00%> (+2.03%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rootulp rootulp requested a review from rach-id October 30, 2022 11:26
@rootulp rootulp enabled auto-merge (squash) October 30, 2022 11:27
Copy link
Member

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

utACK

@rootulp rootulp merged commit 677ce58 into celestiaorg:main Oct 31, 2022
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.

Consider removing count from sparse share splitter Celestia-app ADR006: WriteNamespacedPaddedShares
3 participants