merkle-tools
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -91,3 +91,3 @@ /*jslint node: true */ | ||
this.getMerkleRoot = function () { | ||
if (!tree.isReady) return null; | ||
if (!tree.isReady || tree.levels.length === 0) return null; | ||
return tree.levels[0][0]; | ||
@@ -94,0 +94,0 @@ }; |
{ | ||
"name": "merkle-tools", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Tools for creating merkle trees, generating merkle proofs, and verification of merkle proofs.", | ||
@@ -5,0 +5,0 @@ "main": "merkletools.js", |
@@ -14,3 +14,14 @@ var should = require('should'); | ||
describe("make tree with no leaves", function () { | ||
var merkleTools = new merkletools(); | ||
merkleTools.makeTree(); | ||
it("merkle root value should be null", function () { | ||
assert.equal(merkleTools.getMerkleRoot(), null); | ||
}); | ||
}); | ||
describe("make tree with addLeaves hex", function () { | ||
@@ -17,0 +28,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25933
371