From 79039d705a43c604cc711cb591536479ee86eb3c Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 20 Jun 2023 10:26:17 -0400 Subject: [PATCH] docs: godoc for rebuildShares --- extendeddatacrossword.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extendeddatacrossword.go b/extendeddatacrossword.go index c58cf0b..e3fffa2 100644 --- a/extendeddatacrossword.go +++ b/extendeddatacrossword.go @@ -241,13 +241,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 }