use copybuffer

forknote_comp
clintar 2015-11-12 13:42:40 -07:00
parent da133cd384
commit 0ac11dca8b
1 changed files with 2 additions and 1 deletions

View File

@ -143,8 +143,9 @@ void get_block_id(const Nan::FunctionCallbackInfo<v8::Value>& info) {
return THROW_ERROR_EXCEPTION("Failed to calculate hash for block");
char *cstr = reinterpret_cast<char*>(&block_id);
v8::Local<v8::Value> returnValue = Nan::CopyBuffer(cstr, 32).ToLocalChecked();
info.GetReturnValue().Set(
Nan::NewBuffer(cstr, 32, callback,0).ToLocalChecked()
returnValue
);
}