Skip to content

Commit

Permalink
docs: godoc for rebuildShares (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp authored Jun 23, 2023
1 parent eb06300 commit 5b159e6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion extendeddatacrossword.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,19 @@ func (eds *ExtendedDataSquare) solveCrosswordCol(
return true, true, nil
}

// rebuildShares attempts to rebuild a row or column of shares.
// Returns
// 1. An entire row or column of shares so original + parity shares.
// 2. Whether the original shares could be decoded from the shares parameter.
// 3. [Optional] an error.
func (eds *ExtendedDataSquare) rebuildShares(
isExtendedPartIncomplete bool,
shares [][]byte,
) ([][]byte, bool, error) {
rebuiltShares, err := eds.codec.Decode(shares)
if err != nil {
// repair unsuccessful
// Decode was unsuccessful but don't propagate the error because that
// would halt the progress of solveCrosswordRow or solveCrosswordCol.
return nil, false, nil
}

Expand Down

0 comments on commit 5b159e6

Please sign in to comment.