diff --git a/node/crypto/lazy_proof_tree.go b/node/crypto/lazy_proof_tree.go index eda4165..c38f7cc 100644 --- a/node/crypto/lazy_proof_tree.go +++ b/node/crypto/lazy_proof_tree.go @@ -104,9 +104,12 @@ func (n *LazyVectorCommitmentBranchNode) Commit( vector := make([][]byte, len(n.Children)) wg := sync.WaitGroup{} workers := 1 - if n.LongestBranch <= 2 { + if n.LongestBranch <= 3 { workers = runtime.WorkerCount(0, false) } + if n.LongestBranch > 3 { + fmt.Printf("DEBUG: Performing commit under %v path, leaves: %d\n", path, n.LeafCount) + } throttle := make(chan struct{}, workers) for i, child := range n.Children { throttle <- struct{}{}