Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
laser committed Apr 25, 2018
1 parent 45cc089 commit c6ac8cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions merkletree.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package merkletree

import (
"bytes"
"math"
"errors"
"math"
)

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -70,9 +70,9 @@ func NewTree(providedSumFunc func([]byte) []byte, blocks [][]byte) *Tree {
sumFunc := func(isLeaf bool, xs []byte) []byte {
if isLeaf {
return providedSumFunc(append([]byte{0x00}, xs...))
} else {
return providedSumFunc(append([]byte{0x01}, xs...))
}

return providedSumFunc(append([]byte{0x01}, xs...))
}

// represents each row in the tree, where rows[0] is the base and rows[len(rows)-1] is the root
Expand Down Expand Up @@ -140,7 +140,7 @@ func (t *Tree) VerifyProof(p *Proof) bool {
z = t.checksumFunc(false, append(p.parts[i].checksum, z...))
}

index = int(math.Floor(float64(index / 2)))
index = int(float64(index / 2))
}

return bytes.Equal(t.root.GetChecksum(), z)
Expand Down Expand Up @@ -188,7 +188,7 @@ func (t *Tree) CreateProof(leafChecksum []byte) (*Proof, error) {
})
}

index = int(math.Floor(float64(index / 2)))
index = int(float64(index / 2))
}

return &Proof{
Expand Down

0 comments on commit c6ac8cc

Please sign in to comment.