test: add chain test for removeChains.
This commit is contained in:
parent
ef8b205a38
commit
41f711987c
@ -233,6 +233,20 @@ describe('Chain', function() {
|
||||
assert.equal(txs.length, 44);
|
||||
}));
|
||||
|
||||
it('should get tips and remove chains', cob(function* () {
|
||||
var tips = yield chain.db.getTips();
|
||||
|
||||
assert.notEqual(tips.indexOf(chain.tip.hash), -1);
|
||||
assert.equal(tips.length, 2);
|
||||
|
||||
yield chain.db.removeChains();
|
||||
|
||||
tips = yield chain.db.getTips();
|
||||
|
||||
assert.notEqual(tips.indexOf(chain.tip.hash), -1);
|
||||
assert.equal(tips.length, 1);
|
||||
}));
|
||||
|
||||
it('should rescan for transactions', cob(function* () {
|
||||
var total = 0;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user