Free block buffer memory.
This commit is contained in:
parent
24e705b265
commit
91004a24a9
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -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()),
|
||||
|
|
Loading…
Reference in New Issue