MCPcopy Create free account
hub / github.com/DOSNetwork/core / Shares

Method Shares

share/poly.go:337–343  ·  view source on GitHub ↗

Shares creates a list of n public commitment shares p(1),...,p(n).

(n int)

Source from the content-addressed store, hash-verified

335
336// Shares creates a list of n public commitment shares p(1),...,p(n).
337func (p *PubPoly) Shares(n int) []*PubShare {
338 shares := make([]*PubShare, n)
339 for i := range shares {
340 shares[i] = p.Eval(i)
341 }
342 return shares
343}
344
345// Add computes the component-wise sum of the polynomials p and q and returns it
346// as a new polynomial. NOTE: If the base points p.b and q.b are different then the

Callers

nothing calls this directly

Calls 1

EvalMethod · 0.95

Tested by

no test coverage detected