Free block buffer memory.

This commit is contained in:
Braydon Fuller 2015-07-09 17:34:37 -04:00
parent 24e705b265
commit 91004a24a9
2 changed files with 21 additions and 0 deletions

View File

@ -78,4 +78,22 @@ describe('Basic Functionality', function() {
});
});
describe.skip('get the chain', function() {
var heights = [];
for (var i = 364599; i >= 0 ; i--) {
heights.push(i);
}
heights.forEach(function(height) {
it('block at height ' + height, function(done) {
bitcoind.getBlock(height, function(err, response) {
var block = bitcore.Block.fromBuffer(response);
console.log(block.hash);
done();
});
});
});
});
});

View File

@ -906,6 +906,9 @@ async_get_block_after(uv_work_t *req) {
Local<Value> rawNodeBuffer = node::Buffer::New(isolate, data->buffer, data->size);
delete data->buffer;
data->buffer = NULL;
const unsigned argc = 2;
Local<Value> argv[argc] = {
Local<Value>::New(isolate, NanNull()),