mirror of
https://github.com/wealdtech/ethdo.git
synced 2026-01-08 21:48:05 -05:00
Linting.
This commit is contained in:
@@ -75,9 +75,9 @@ func (p *polynomial) evaluate(x uint8) uint8 {
|
||||
func interpolatePolynomial(xSamples, ySamples []uint8, x uint8) uint8 {
|
||||
limit := len(xSamples)
|
||||
var result, basis uint8
|
||||
for i := 0; i < limit; i++ {
|
||||
for i := range limit {
|
||||
basis = 1
|
||||
for j := 0; j < limit; j++ {
|
||||
for j := range limit {
|
||||
if i == j {
|
||||
continue
|
||||
}
|
||||
@@ -183,7 +183,7 @@ func Split(secret []byte, parts, threshold int) ([][]byte, error) {
|
||||
// Generate a `parts` number of (x,y) pairs
|
||||
// We cheat by encoding the x value once as the final index,
|
||||
// so that it only needs to be stored once.
|
||||
for i := 0; i < parts; i++ {
|
||||
for i := range parts {
|
||||
x := uint8(xCoordinates[i]) + 1
|
||||
y := p.evaluate(x)
|
||||
out[i][idx] = y
|
||||
|
||||
Reference in New Issue
Block a user