Skip to content

Commit

Permalink
Fix for goose
Browse files Browse the repository at this point in the history
  • Loading branch information
upamanyus committed Dec 3, 2024
1 parent cdc4a8b commit 079de24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion merkle/merkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ func (t *Tree) Put(label []byte, mapVal []byte) ([]byte, []byte, bool) {

// make leaf node with correct hash.
lastInterior := interiors[cryptoffi.HashLen-1]
lastPos := label[cryptoffi.HashLen-1]
// XXX: To deal with goose failing to handle the implicit conversion to int
// when using as a slice index
lastPos := uint64(label[cryptoffi.HashLen-1])
lastInterior.children[lastPos] = &node{mapVal: mapVal, hash: compLeafNodeHash(mapVal)}

// correct hashes of interior nodes, bubbling up.
Expand Down

0 comments on commit 079de24

Please sign in to comment.