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

test: add test case based on celestia-node usage #239

Merged
merged 5 commits into from
Jul 8, 2023

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jul 7, 2023

@rootulp rootulp added enhancement New feature or request testing labels Jul 7, 2023
@rootulp rootulp requested review from staheri14 and evan-forbes July 7, 2023 14:15
@rootulp rootulp self-assigned this Jul 7, 2023
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #239 (604ae0a) into main (658af68) will not change coverage.
The diff coverage is n/a.

❗ Current head 604ae0a differs from pull request most recent head 11bb1c0. Consider uploading reports for the commit 11bb1c0 to get more accurate results

@@           Coverage Diff           @@
##             main     #239   +/-   ##
=======================================
  Coverage   78.30%   78.30%           
=======================================
  Files           7        7           
  Lines         553      553           
=======================================
  Hits          433      433           
  Misses         73       73           
  Partials       47       47           

Comment on lines +176 to +184
// Populate EDS with 1/4 of chunks using SetCell
err = eds.SetCell(0, 0, exampleEds.GetCell(0, 0))
require.NoError(t, err)
err = eds.SetCell(0, 1, exampleEds.GetCell(0, 1))
require.NoError(t, err)
err = eds.SetCell(1, 0, exampleEds.GetCell(1, 0))
require.NoError(t, err)
err = eds.SetCell(1, 1, exampleEds.GetCell(1, 1))
require.NoError(t, err)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Considered refactoring to

	for row := 0; row < edsWidth/2; row++ {
		for col := 0; col < edsWidth/2; col++ {
			err = eds.SetCell(uint(row), uint(col), exampleEds.GetCell(uint(row), uint(col)))
			require.NoError(t, err)
		}
	}

but I think the existing implementation is easier to read.

@rootulp rootulp marked this pull request as ready for review July 7, 2023 18:26
@rootulp rootulp enabled auto-merge (squash) July 7, 2023 18:28
staheri14
staheri14 previously approved these changes Jul 7, 2023
Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

LGTM!

rsmt2d_test.go Outdated Show resolved Hide resolved
@rootulp rootulp merged commit 48c85e5 into celestiaorg:main Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

testing: add a test case based on celestia-node usage
3 participants