diff --git a/test/chain-test.js b/test/chain-test.js index d797a35a..468cfad2 100644 --- a/test/chain-test.js +++ b/test/chain-test.js @@ -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* () { var balance; @@ -134,6 +140,12 @@ describe('Chain', function() { 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* () { var balance; @@ -195,6 +207,12 @@ describe('Chain', function() { 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* () { var block, tx, output, coin;