diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 32acbb9f..e1e18806 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -1851,6 +1851,11 @@ async_get_progress_after(uv_work_t *req) { unsigned int days_behind = left / 60 / 60 / 24; unsigned int percent = (unsigned int)(progress * 100.0); + if (percent == 100 || left < 0) { + hours_behind = 0; + days_behind = 0; + } + Local result = NanNew(); result->Set(NanNew("blocks"),