test: add chain state test.
This commit is contained in:
parent
aad1691f7e
commit
c02514a8b3
@ -99,6 +99,12 @@ describe('Chain', function() {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should have correct chain value', cob(function* () {
|
||||||
|
assert.equal(chain.db.state.value, 55000000000);
|
||||||
|
assert.equal(chain.db.state.coin, 20);
|
||||||
|
assert.equal(chain.db.state.tx, 21);
|
||||||
|
}));
|
||||||
|
|
||||||
it('should have correct balance', cob(function* () {
|
it('should have correct balance', cob(function* () {
|
||||||
var balance;
|
var balance;
|
||||||
|
|
||||||
@ -134,6 +140,12 @@ describe('Chain', function() {
|
|||||||
assert(chain.tip.chainwork.cmp(tip1.chainwork) > 0);
|
assert(chain.tip.chainwork.cmp(tip1.chainwork) > 0);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should have correct chain value', cob(function* () {
|
||||||
|
assert.equal(chain.db.state.value, 60000000000);
|
||||||
|
assert.equal(chain.db.state.coin, 21);
|
||||||
|
assert.equal(chain.db.state.tx, 22);
|
||||||
|
}));
|
||||||
|
|
||||||
it('should have correct balance', cob(function* () {
|
it('should have correct balance', cob(function* () {
|
||||||
var balance;
|
var balance;
|
||||||
|
|
||||||
@ -195,6 +207,12 @@ describe('Chain', function() {
|
|||||||
assert(chain.tip === tip);
|
assert(chain.tip === tip);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should have correct chain value', cob(function* () {
|
||||||
|
assert.equal(chain.db.state.value, 65000000000);
|
||||||
|
assert.equal(chain.db.state.coin, 23);
|
||||||
|
assert.equal(chain.db.state.tx, 24);
|
||||||
|
}));
|
||||||
|
|
||||||
it('should get coin', cob(function* () {
|
it('should get coin', cob(function* () {
|
||||||
var block, tx, output, coin;
|
var block, tx, output, coin;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user