diff --git a/stream.go b/stream.go index 068bb0c..68d18d1 100644 --- a/stream.go +++ b/stream.go @@ -49,8 +49,9 @@ type merkleHash struct { } func (mh *merkleHash) Reset() { - mh1 := newMerkleHash(mh.hm, mh.blockSize) - *mh = *mh1 + mh.tree = &Tree{Nodes: []*Node{}, BlockLength: mh.blockSize} + mh.lastBlockLen = 0 + mh.partialLastNode = false } func (mh merkleHash) Nodes() []*Node {