updated the calcDifficulty test to make it clear with what we're testing
This commit is contained in:
parent
9c6c300289
commit
3118ab1d0c
|
@ -189,13 +189,13 @@ describe('util', function() {
|
||||||
});
|
});
|
||||||
describe('#calcDifficulty', function() {
|
describe('#calcDifficulty', function() {
|
||||||
var bitsgenesis = 486604799;
|
var bitsgenesis = 486604799;
|
||||||
it('should work for ' + bitsgenesis, function() {
|
it('should work for the bits from the genesis block; ' + bitsgenesis, function() {
|
||||||
var difficulty = coinUtil.calcDifficulty(bitsgenesis);
|
var difficulty = coinUtil.calcDifficulty(bitsgenesis);
|
||||||
difficulty.should.equal(1);
|
difficulty.should.equal(1);
|
||||||
});
|
});
|
||||||
var bitslater = 419476394;
|
var randomotherbits = 419476394;
|
||||||
it('should work for ' + bitslater, function() {
|
it('should work for the bits in a randomly chosen block, eg [00000000000000001fef2bbc6da9b65e16f9187b7d88f15a308490bf2c9b8e1d] ' + randomotherbits, function() {
|
||||||
var difficulty = coinUtil.calcDifficulty(bitslater);
|
var difficulty = coinUtil.calcDifficulty(randomotherbits);
|
||||||
difficulty.should.equal(6119726089);
|
difficulty.should.equal(6119726089);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue