insight-bitcore-api
Version:
An open-source bitcoin blockchain API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.
26 lines (19 loc) • 477 B
JavaScript
var
config = require('../config/config'),
levelup = require('levelup');
db = levelup(config.leveldb + '/blocks');
db.createReadStream({start: 'b-'})
.on('data', function (data) {
console.log('[block-level.js.11:data:]',data); //TODO
if (data==false) c++;
})
.on('error', function (err) {
return cb(err);
})
.on('close', function () {
return cb(null);
})
.on('end', function () {
return cb(null);
});