aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2016-05-05 20:30:09 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2016-05-05 20:30:09 -0400
commit38f36429617583277028cc7faaf615d3607e827c (patch)
tree9014244e22df50a18a1717a161357f1bae79d6a4 /main.go
parent67e72810da5014a6e1a355dc1cdc8455c96de8a6 (diff)
downloadpos-38f36429617583277028cc7faaf615d3607e827c.tar.gz
Add parallel building
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
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)