mirror of
https://github.com/vbatts/merkle.git
synced 2024-12-26 05:16:30 +00:00
.: golint
This commit is contained in:
parent
3cc77c8073
commit
558c5d610d
1 changed files with 5 additions and 5 deletions
10
stream.go
10
stream.go
|
@ -62,8 +62,8 @@ func (mh merkleHash) Root() *Node {
|
||||||
// if that last block was complete, then no worries. start the next node.
|
// if that last block was complete, then no worries. start the next node.
|
||||||
func (mh *merkleHash) Sum(b []byte) []byte {
|
func (mh *merkleHash) Sum(b []byte) []byte {
|
||||||
var (
|
var (
|
||||||
curBlock = []byte{}
|
curBlock = []byte{}
|
||||||
offset int = 0
|
offset int
|
||||||
)
|
)
|
||||||
if mh.partialLastNode {
|
if mh.partialLastNode {
|
||||||
// if this is true, then we need to pop the last node
|
// if this is true, then we need to pop the last node
|
||||||
|
@ -130,10 +130,10 @@ func (mh *merkleHash) Write(b []byte) (int, error) {
|
||||||
// * stash remainder in the mh.lastBlock
|
// * stash remainder in the mh.lastBlock
|
||||||
|
|
||||||
var (
|
var (
|
||||||
curBlock = make([]byte, mh.blockSize)
|
curBlock = make([]byte, mh.blockSize)
|
||||||
numBytes int = 0
|
numBytes int
|
||||||
numWritten int
|
numWritten int
|
||||||
offset int = 0
|
offset int
|
||||||
)
|
)
|
||||||
if mh.lastBlock != nil && mh.lastBlockLen > 0 {
|
if mh.lastBlock != nil && mh.lastBlockLen > 0 {
|
||||||
// XXX off by one?
|
// XXX off by one?
|
||||||
|
|
Loading…
Reference in a new issue