Harder POW for node platform

This commit is contained in:
Kagami Hiiragi 2015-01-11 01:44:09 +03:00
parent 728bd6d3ae
commit 12066842cc

View File

@ -282,10 +282,12 @@ describe("POW", function() {
if (allTests) {
it("should do a POW", function() {
this.timeout(300000);
return POW.doAsync({target: 10693764680411, initialHash: Buffer("8ff2d685db89a0af2e3dbfd3f700ae96ef4d9a1eac72fd778bbb368c7510cddda349e03207e1c4965bd95c6f7265e8f1a481a08afab3874eaafb9ade09a10880", "hex")})
.then(function(nonce) {
var target = typeof window === "undefined" ? 297422593171 : 10693764680411;
var nonces = typeof window === "undefined" ? [21997550] : [2373146, 2543600];
return POW.doAsync({target: target, initialHash: Buffer("8ff2d685db89a0af2e3dbfd3f700ae96ef4d9a1eac72fd778bbb368c7510cddda349e03207e1c4965bd95c6f7265e8f1a481a08afab3874eaafb9ade09a10880", "hex")})
.then(function(computedNonce) {
// Multiple valid nonces.
expect([2373146, 2543600]).to.include(nonce);
expect(nonces).to.include(computedNonce);
});
});
}