Skip to content

Commit

Permalink
fix: free ring verifier (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
greywolve authored Nov 20, 2024
1 parent 6967bb3 commit c79c4c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/safrole/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type ValidatorsData [common.NumberOfValidators]crypto.ValidatorKey
// Returns the RingCommitment for this state i.e. γz.
func (state State) CalculateRingCommitment() (crypto.RingCommitment, error) {
ringVerifier, err := state.RingVerifier()
defer ringVerifier.Free()
if err != nil {
return crypto.RingCommitment{}, err
}
Expand Down
1 change: 1 addition & 0 deletions internal/statetransition/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ func calculateTickets(safstate safrole.State, entropyPool state.EntropyPool, tic
}

ringVerifier, err := safstate.RingVerifier()
defer ringVerifier.Free()
if err != nil {
return []block.Ticket{}, err
}
Expand Down

0 comments on commit c79c4c7

Please sign in to comment.