Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Jan 11, 2023
1 parent fa835ed commit d011c02
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ type (
NodeResolverFn func([]byte) ([]byte, error)
)

// Committer represents an object that is able to create the
// commitment to a polynomial.
type Committer interface {
CommitToPoly([]Fr, int) Point
}

type keylist [][]byte

func (kl keylist) Len() int {
Expand Down Expand Up @@ -932,7 +926,6 @@ func (n *LeafNode) getOldCn(index byte) (*Point, *Fr) {
func (n *LeafNode) updateC(stem []byte, index byte, c *Point, oldc *Fr) {
var (
newc Fr
diff Point
poly [256]Fr
)

Expand All @@ -943,12 +936,10 @@ func (n *LeafNode) updateC(stem []byte, index byte, c *Point, oldc *Fr) {
if n.commitment == nil {
poly[0].SetUint64(1)
StemFromBytes(&poly[1], stem)
comm := cfg.conf.Commit(poly[:])
n.commitment = &comm
n.commitment = cfg.CommitToPoly(poly[:], 0)
return
}
diff = cfg.conf.Commit(poly[:])
n.commitment.Add(n.commitment, &diff)
n.commitment.Add(n.commitment, cfg.CommitToPoly(poly[:], 0))
}

func (n *LeafNode) updateCn(index byte, oldValue []byte, c *Point) {
Expand Down

0 comments on commit d011c02

Please sign in to comment.