Skip to content

Commit

Permalink
chore: update the example code
Browse files Browse the repository at this point in the history
  • Loading branch information
kobakaku committed Aug 6, 2024
1 parent d09175d commit 2099079
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ func main() {
// ComputeExtendedDataSquare failed
}

rowRoots, err := eds.RowRoots()
if err != nil {
// RowRoots failed
}
colRoots, err := eds.ColRoots()
if err != nil {
// ColRoots failed
}

flattened := eds.Flattened()

// Delete some shares, just enough so that repairing is possible.
Expand All @@ -56,9 +65,9 @@ func main() {
}

// Repair square.
err := eds.Repair(
eds.RowRoots(),
eds.ColRoots(),
err = eds.Repair(
rowRoots,
colRoots,
)
if err != nil {
// err contains information to construct a fraud proof
Expand Down

0 comments on commit 2099079

Please sign in to comment.