From 38f36429617583277028cc7faaf615d3607e827c Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Thu, 5 May 2016 20:30:09 -0400 Subject: Add parallel building --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 3bf3f6b..98a5218 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ func main() { height := flag.Int64("height", 0, "number of nodes is 2 ** height - 1") fname := flag.String("db", "test.db", "filename for the database") mtype := flag.String("mtype", "bfs", "type of Merkle tree (bfs or post)") + p := flag.Bool("p", false, "parallel build") prof := flag.String("prof", "prof.prof", "filename for profile information") flag.Parse() @@ -22,7 +23,7 @@ func main() { defer pprof.StopCPUProfile() m := NewMerkle(*mtype, *height, *fname) - m.Build() + m.Build(*p) /* root := make([]byte, hashSize) m.Read(root, 0) -- cgit v1.2.3-70-g09d2