Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
unused
Browse files Browse the repository at this point in the history
  • Loading branch information
ChihChengLiang committed Sep 12, 2023
1 parent ab8656b commit 63cba13
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions mpt-witness-generator/witness/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"log"
"os"
"path/filepath"
"strconv"
)

func check(err error) {
Expand All @@ -15,33 +14,6 @@ func check(err error) {
}
}

func MatrixToJson(rows [][]byte) string {
// Had some problems with json.Marshal, so I just prepare json manually.
json := "["
for i := 0; i < len(rows); i++ {
json += listToJson(rows[i])
if i != len(rows)-1 {
json += ","
}
}
json += "]"

return json
}

func listToJson(row []byte) string {
json := "["
for j := 0; j < len(row); j++ {
json += strconv.Itoa(int(row[j]))
if j != len(row)-1 {
json += ","
}
}
json += "]"

return json
}

func StoreNodes(testName string, nodes []Node) {
name := testName + ".json"
path := "../generated_witnesses/" + name
Expand Down

0 comments on commit 63cba13

Please sign in to comment.