Skip to content

Commit

Permalink
implement comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniRamirezM committed Aug 8, 2024
1 parent 41a0d4d commit 6d90a34
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions aggregator/prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ import (
"github.com/iden3/go-iden3-crypto/poseidon"
)

const (
stateRootStartIndex = 19
stateRootFinalIndex = stateRootStartIndex + 8
)

var (
ErrBadProverResponse = errors.New("Prover returned wrong type for response") //nolint:revive
ErrProverInternalError = errors.New("Prover returned INTERNAL_ERROR response") //nolint:revive
Expand Down Expand Up @@ -348,9 +353,12 @@ func GetStateRootFromProof(proof string) (common.Hash, error) {
return common.Hash{}, err
}

var v [8]uint64
var j = 0
for i := 19; i < 19+8; i++ {
var (
v [8]uint64
j = 0
)

for i := stateRootStartIndex; i < stateRootFinalIndex; i++ {
u64, err := strconv.ParseInt(publics.Publics[i], 10, 64)
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 6d90a34

Please sign in to comment.