Skip to content

Commit

Permalink
chore: pluralize
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Jul 12, 2023
1 parent 5ca7f3f commit 2b22e3a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions extendeddatasquare.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,24 @@ func (eds *ExtendedDataSquare) Width() uint {
return eds.width
}

// Roots returns a byte slice with this eds's RowRoots and ColRoots
// concatenated.
func (eds *ExtendedDataSquare) Roots() (roots [][]byte, err error) {
rowRoots, err := eds.RowRoots()
if err != nil {
return nil, err
}
colRoots, err := eds.ColRoots()
if err != nil {
return nil, err
}

roots = make([][]byte, 0, len(rowRoots)+len(colRoots))
roots = append(roots, rowRoots...)
roots = append(roots, colRoots...)
return roots, nil
}

// Flattened returns the extended data square as a flattened slice of bytes.
func (eds *ExtendedDataSquare) Flattened() [][]byte {
return eds.dataSquare.Flattened()
Expand Down

0 comments on commit 2b22e3a

Please sign in to comment.