Skip to content

Commit

Permalink
Tweak for Goose
Browse files Browse the repository at this point in the history
  • Loading branch information
upamanyus committed Dec 2, 2024
1 parent 8075b4f commit e2932de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion merkle/merkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ func (t *Tree) Put(label []byte, mapVal []byte) ([]byte, []byte, bool) {
n := cryptoffi.HashLen - 1
for depth := uint64(0); depth < n; depth++ {
currNode := interiors[depth]
pos := label[depth]

// XXX: Converting to `uint64` for Goose, since it does not handle the
// implicit conversion from uint8 to int when using `pos` as a slice
// index.
pos := uint64(label[depth])

if currNode.children[pos] == nil {
currNode.children[pos] = newInteriorNode()
}
Expand Down

0 comments on commit e2932de

Please sign in to comment.