Skip to content

Commit

Permalink
Export Cell
Browse files Browse the repository at this point in the history
  • Loading branch information
musalbas committed Apr 4, 2019
1 parent 02df22e commit a86475b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datasquare.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ func (ds *dataSquare) computeColumnProof(x uint, y uint) ([]byte, [][]byte, uint
return merkleRoot, proof, uint(proofIndex), uint(numLeaves)
}

func (ds *dataSquare) cell(x uint, y uint) []byte {
return ds.square[x][y]
// Cell returns a single chunk at a specific cell.
func (ds *dataSquare) Cell(x uint, y uint) []byte {
cell := make([]byte, ds.chunkSize)
copy(cell, ds.square[x][y])
return cell
}

func (ds *dataSquare) setCell(x uint, y uint, newChunk []byte) {
Expand Down

0 comments on commit a86475b

Please sign in to comment.