attestantio / vouch

Apache License 2.0
112 stars 28 forks source link

fix: bestScore is a pointer to a big.Int and we were changing the pointer itself instead of changing the data on the pointer #216

Closed MrKoberman closed 3 months ago

MrKoberman commented 3 months ago

Bug

The best value block was not selected.

bestScore is a pointer to a big.Int, and when you do bestScore = resp.score, you're changing the pointer itself, not the data it points to. This change will not be visible outside the function.