Mise à jour de GitLab prévue ce samedi 23 octobre 2021 à partir de 9h00 CET

Commit 463b86aa authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1126 Broken test

parent 2db5a1f7
......@@ -45,13 +45,13 @@ describe('PoW block prover', () => {
const proof = yield prover.prove(block, 24, forcedTime)
proof.should.containEql({
version: 10,
nonce: 34000000000010,
nonce: 340000000000034,
number: 35,
time: 1,
currency: '',
issuer: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd',
signature: 'iG9XEEIoGvCuFLRXqXIcGKFeK88K/A0J9MfKWAGvkRHtf6+VtMR/VDtPP67UzfnVdJb4QfMqrNsPMH2+7bTTAA==',
hash: '07573FEA1248562F47B1FA7DABDAF93C93B7328AA528F470B488249D5806F66D',
signature: 'E2sL6bFC9yOZSqBlSGYF158gsAXfJlWsHRHy1oVn3e7ZR6e6SXQ5Sq2fm1ex6Wv4BqO3n9qq0OHsxajUxshICg==',
hash: '03B176DE082DC451235763D4087305BBD01FD6B6C3248C74EF93B0839DFE9A05',
parameters: '',
previousHash: undefined,
previousIssuer: undefined,
......@@ -68,17 +68,17 @@ describe('PoW block prover', () => {
});
}));
it('should be able to use a prefix with 6 digits', () => co(function*(){
it('should be able to use a prefix maxed at 899', () => co(function*(){
const block = {
number: 1,
issuer: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd'
}
const params = yield prover.changePoWPrefix('123456')
params.should.deepEqual({ prefix: '123456' })
const params = yield prover.changePoWPrefix('899')
params.should.deepEqual({ prefix: '899' })
const forcedTime = 1;
const proof = yield prover.prove(block, 1, forcedTime)
proof.nonce.should.equal(123456000000000000)
String(proof.nonce).should.have.length(18)
proof.nonce.should.equal(8990000000000001)
String(proof.nonce).should.have.length(16)
}));
it('should be able to stop a proof', () => co(function*(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment