From 8e19d34a1ac8b133b2bbc56a976b6ecd9ebca440 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Tue, 3 Jan 2023 06:19:01 +0200 Subject: [PATCH] Fix PoW building --- src/worker.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/worker.cc b/src/worker.cc index 8c4cf70..e7abd87 100644 --- a/src/worker.cc +++ b/src/worker.cc @@ -2,7 +2,7 @@ #include #include "./pow.h" -using v8::Handle; +// using v8::Handle; using v8::Local; using v8::FunctionTemplate; using v8::Function; @@ -71,8 +71,8 @@ NAN_METHOD(PowAsync) { return Nan::ThrowError("Bad input"); } - size_t pool_size = info[0]->Uint32Value(); - uint64_t target = info[1]->IntegerValue(); + size_t pool_size = (size_t)Nan::To(info[0]).FromJust(); + uint64_t target = Nan::To(info[1]).FromJust(); char* buf = node::Buffer::Data(info[2]); size_t length = node::Buffer::Length(info[2]); if (pool_size < 1 ||