Fix PoW building

This commit is contained in:
Lee Miller 2023-01-03 06:19:01 +02:00
parent 573ed263bc
commit 6ec1ae888f
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -2,7 +2,7 @@
#include <nan.h> #include <nan.h>
#include "./pow.h" #include "./pow.h"
using v8::Handle; // using v8::Handle;
using v8::Local; using v8::Local;
using v8::FunctionTemplate; using v8::FunctionTemplate;
using v8::Function; using v8::Function;
@ -71,8 +71,8 @@ NAN_METHOD(PowAsync) {
return Nan::ThrowError("Bad input"); return Nan::ThrowError("Bad input");
} }
size_t pool_size = info[0]->Uint32Value(); size_t pool_size = (size_t)Nan::To<uint32_t>(info[0]).FromJust();
uint64_t target = info[1]->IntegerValue(); uint64_t target = Nan::To<int64_t>(info[1]).FromJust();
char* buf = node::Buffer::Data(info[2]); char* buf = node::Buffer::Data(info[2]);
size_t length = node::Buffer::Length(info[2]); size_t length = node::Buffer::Length(info[2]);
if (pool_size < 1 || if (pool_size < 1 ||