From 2a7d32bbf076f778348e8174e9e60517cd98e72f Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 6 Oct 2014 11:06:23 -0700 Subject: [PATCH] reorganize IsStopping() and IsStopped(). --- src/bitcoindjs.cc | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 8e5cdf6b..14c2179f 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -470,30 +470,6 @@ async_start_node_after(uv_work_t *req) { delete req; } -/** - * IsStopping() - * bitcoind.stopping() - * Check whether bitcoind is in the process of shutting down. This is polled - * from javascript. - */ - -NAN_METHOD(IsStopping) { - NanScope(); - NanReturnValue(NanNew(ShutdownRequested())); -} - -/** - * IsStopped() - * bitcoind.stopped() - * Check whether bitcoind has shutdown completely. This will be polled by - * javascript to check whether the libuv event loop is safe to stop. - */ - -NAN_METHOD(IsStopped) { - NanScope(); - NanReturnValue(NanNew(shutdownComplete)); -} - /** * start_node(void) * Start AppInit2() on a separate thread, wait for @@ -651,6 +627,30 @@ async_stop_node_after(uv_work_t *req) { delete req; } +/** + * IsStopping() + * bitcoind.stopping() + * Check whether bitcoind is in the process of shutting down. This is polled + * from javascript. + */ + +NAN_METHOD(IsStopping) { + NanScope(); + NanReturnValue(NanNew(ShutdownRequested())); +} + +/** + * IsStopped() + * bitcoind.stopped() + * Check whether bitcoind has shutdown completely. This will be polled by + * javascript to check whether the libuv event loop is safe to stop. + */ + +NAN_METHOD(IsStopped) { + NanScope(); + NanReturnValue(NanNew(shutdownComplete)); +} + /** * GetBlock() * bitcoind.getBlock(blockHash, callback)