From 2099079380159749cb485abfdd4b86bd2b8ea869 Mon Sep 17 00:00:00 2001 From: kobakaku Date: Tue, 6 Aug 2024 23:35:48 +0900 Subject: [PATCH] chore: update the example code --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ae534ba..d4f8400 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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