fix conflics
This commit is contained in:
commit
44901cd635
19 changed files with 560 additions and 350 deletions
|
|
@ -125,4 +125,35 @@ describe('Insight model', function() {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
it('#checkActivity for innactive addreses', function(done) {
|
||||
var w = new Insight();
|
||||
w.getTransactions = function(addresses, cb) {
|
||||
cb([]);
|
||||
};
|
||||
|
||||
w.checkActivity(addresses, function(err, actives){
|
||||
console.log(err);
|
||||
actives.length.should.equal(addresses.length);
|
||||
actives.filter(function(i) { return i }).length.should.equal(0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('#checkActivity for active addreses', function(done) {
|
||||
var w = new Insight();
|
||||
w.getTransactions = function(addresses, cb) {
|
||||
cb([
|
||||
{vin: [{ addr: '2NATQJnaQe2CUKLyhL1zdNkttJM1dUH9HaM'}], vout: []},
|
||||
{vin: [{ addr: '2NATQJnaQe2CUKLyhL1zdNkttJM1dUH9HaM'}], vout: []},
|
||||
{vin: [{ addr: '2N9D5bcCQ2bPWUDByQ6Qb5bMgMtgsk1rw3x'}], vout: []},
|
||||
{vin: [], vout: [{scriptPubKey: {addresses: ['2NFjCBFZSsxiwWAD7CKQ3hzWFtf9DcqTucY']}}]}
|
||||
]);
|
||||
};
|
||||
|
||||
w.checkActivity(addresses, function(err, actives){
|
||||
actives.length.should.equal(addresses.length);
|
||||
actives.filter(function(i) { return i }).length.should.equal(3);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue