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

chore: use deepCopy #175

Merged
merged 1 commit into from
Jun 23, 2023
Merged

chore: use deepCopy #175

merged 1 commit into from
Jun 23, 2023

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jun 19, 2023

Closes #171

func TestEDSRowColImmutable(t *testing.T) {
codec := NewLeoRSCodec()
result, err := ComputeExtendedDataSquare([][]byte{
ones, twos,
threes, fours,
}, codec, NewDefaultTree)
if err != nil {
panic(err)
}
row := result.Row(0)
row[0][0]++
if reflect.DeepEqual(row, result.Row(0)) {
t.Errorf("Exported EDS Row was mutable")
}
col := result.Col(0)
col[0][0]++
if reflect.DeepEqual(col, result.Col(0)) {
t.Errorf("Exported EDS Col was mutable")
}
}
still passes

@rootulp rootulp requested a review from evan-forbes June 19, 2023 17:45
@rootulp rootulp self-assigned this Jun 19, 2023
@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #175 (73a1c35) into master (6515446) will decrease coverage by 0.33%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
- Coverage   81.43%   81.11%   -0.33%     
==========================================
  Files           7        7              
  Lines         528      519       -9     
==========================================
- Hits          430      421       -9     
  Misses         58       58              
  Partials       40       40              
Impacted Files Coverage Δ
extendeddatasquare.go 73.62% <ø> (-2.38%) ⬇️

@rootulp rootulp requested a review from staheri14 June 22, 2023 17:45
@rootulp rootulp merged commit 36829ac into celestiaorg:master Jun 23, 2023
3 of 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.

Code duplication
3 participants