From 6c1c802729b87eccf7101debe6c022ad896f7677 Mon Sep 17 00:00:00 2001 From: lukechampine Date: Sun, 2 Feb 2020 16:40:32 -0500 Subject: [PATCH] skip leading zeros when computing root --- blake3.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blake3.go b/blake3.go index 91ac71f..c6609fb 100644 --- a/blake3.go +++ b/blake3.go @@ -298,14 +298,14 @@ type Hasher struct { used uint64 // bit vector indicating which stack elems are valid; also number of chunks added } -func (h *Hasher) hasSubtreeAtHeight(i uint64) bool { +func (h *Hasher) hasSubtreeAtHeight(i int) bool { return h.used&(1<