diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 0eefeb86..20a8b444 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -2264,10 +2264,10 @@ NAN_METHOD(GetBlockByTime) { Local options = Local::Cast(args[0]); if (options->Get(NanNew("gte"))->IsNumber()) { - data->gte = options->Get(NanNew("gte"))->ToUint32(); + data->gte = options->Get(NanNew("gte"))->IntegerValue(); } if (options->Get(NanNew("lte"))->IsNumber()) { - data->lte = options->Get(NanNew("lte"))->ToUint32(); + data->lte = options->Get(NanNew("lte"))->IntegerValue(); } data->err_msg = std::string(""); @@ -2286,8 +2286,6 @@ NAN_METHOD(GetBlockByTime) { static void async_block_time(uv_work_t *req) { async_block_time_data* data = static_cast(req->data); - CBlock cblock; - CBlockIndex *cblock_index; int64_t i = 0; // XXX Slow: figure out how to ballpark the height based on gte and lte. int64_t height = chainActive.Height();