diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-12-12 12:00:37 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-12-12 12:00:37 +0200 |
commit | fe3c8c9682383bcefe7f111bfa1888293bad75d1 (patch) | |
tree | 390614b35ef0de9d18b7364f74c29311f688b87e /src | |
parent | Merge pull request #4921 (diff) | |
parent | daemon: stop miner before we bring the whole thing down (diff) | |
download | monero-fe3c8c9682383bcefe7f111bfa1888293bad75d1.tar.xz |
Merge pull request #4923
aba9a9c2 daemon: stop miner before we bring the whole thing down (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 1 | ||||
-rw-r--r-- | src/daemon/daemon.cpp | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 35877a8d1..f3249ea92 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -250,6 +250,7 @@ namespace cryptonote //----------------------------------------------------------------------------------- void core::stop() { + m_miner.stop(); m_blockchain_storage.cancel(); tools::download_async_handle handle; diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 13478f39d..88fba8372 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -195,7 +195,6 @@ bool t_daemon::run(bool interactive) for(auto& rpc : mp_internals->rpcs) rpc->stop(); - mp_internals->core.get().get_miner().stop(); MGINFO("Node stopped."); return true; } @@ -217,7 +216,6 @@ void t_daemon::stop() { throw std::runtime_error{"Can't stop stopped daemon"}; } - mp_internals->core.get().get_miner().stop(); mp_internals->p2p.stop(); for(auto& rpc : mp_internals->rpcs) rpc->stop(); |