Skip to content

Commit

Permalink
debug prints deleted and new check added
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Nov 20, 2024
1 parent ec22baa commit 6b83c2d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arbo/hints.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ func replaceSiblingHint(_ *big.Int, inputs, outputs []*big.Int) error {
// get the new sibling and the index to replace
newSibling := inputs[0]
index := int(inputs[1].Int64())
fmt.Println(outputs)
if index >= len(outputs) {
return fmt.Errorf("invalid index")
}
siblings := inputs[2:]
if len(siblings) != len(outputs) {
return fmt.Errorf("invalid number of siblings")
}
for i := 0; i < len(outputs); i++ {
if i == index {
outputs[i] = outputs[i].Set(newSibling)
} else {
outputs[i] = outputs[i].Set(siblings[i])
}
}
fmt.Println(outputs)
return nil
}

0 comments on commit 6b83c2d

Please sign in to comment.