Skip to content

Commit

Permalink
Use length_{a,b} again
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia committed Sep 26, 2024
1 parent 4ed0be9 commit 0f38f83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions specs/_features/eip7594/polynomial-commitments-sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@ def add_polynomialcoeff(a: PolynomialCoeff, b: PolynomialCoeff) -> PolynomialCoe
"""
Sum the coefficient form polynomials ``a`` and ``b``.
"""
a, b = (a, b) if len(a) >= len(b) else (b, a)
return PolynomialCoeff([a[i] + (b[i] if i < len(b) else BLSFieldElement(0)) for i in range(len(a))])
length_a = len(a)
length_b = len(b)
a, b = (a, b) if length_a >= length_b else (b, a)
return PolynomialCoeff([a[i] + (b[i] if i < length_b else BLSFieldElement(0)) for i in range(length_a)])
```

#### `neg_polynomialcoeff`
Expand Down

0 comments on commit 0f38f83

Please sign in to comment.