Merge branch 'trevormil-master'
This commit is contained in:
commit
4fc44db033
|
@ -143,10 +143,8 @@ export class MerkleTree extends Base {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.fillDefaultHash) {
|
if (this.fillDefaultHash) {
|
||||||
for (let i = 0; i < Math.pow(2, Math.ceil(Math.log2(this.leaves.length))); i++) {
|
for (let i = this.leaves.length; i < Math.pow(2, Math.ceil(Math.log2(this.leaves.length))); i++) {
|
||||||
if (i >= this.leaves.length) {
|
this.leaves.push(this.bufferify(this.fillDefaultHash(i, this.hashFn)))
|
||||||
this.leaves.push(this.bufferify(this.fillDefaultHash(i, this.hashFn)))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue