aboutsummaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-12-31 22:34:57 +0200
committerRiccardo Spagni <ric@spagni.net>2015-12-31 22:34:57 +0200
commitb98d88c17e1650fbdca03fb13bb843f071e673c5 (patch)
treec92edc356cc4b4c2a511f3823c8f9e108aa33f00 /src/daemon
parentMerge pull request #586 (diff)
parentNicer looking exit when blockchain.bin is found (diff)
downloadmonero-b98d88c17e1650fbdca03fb13bb843f071e673c5.tar.xz
Merge pull request #587
1e07110 Nicer looking exit when blockchain.bin is found (moneromooo-monero)
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/core.h5
-rw-r--r--src/daemon/daemon.cpp3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/daemon/core.h b/src/daemon/core.h
index ea76289dd..2208ef25a 100644
--- a/src/daemon/core.h
+++ b/src/daemon/core.h
@@ -66,15 +66,16 @@ public:
m_core.set_cryptonote_protocol(&protocol);
}
- void run()
+ bool run()
{
//initialize core here
LOG_PRINT_L0("Initializing core...");
if (!m_core.init(m_vm_HACK))
{
- throw std::runtime_error("Failed to initialize core");
+ return false;
}
LOG_PRINT_L0("Core initialized OK");
+ return true;
}
cryptonote::core & get()
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp
index 6093ecdf8..ed6a66722 100644
--- a/src/daemon/daemon.cpp
+++ b/src/daemon/daemon.cpp
@@ -118,7 +118,8 @@ bool t_daemon::run(bool interactive)
try
{
- mp_internals->core.run();
+ if (!mp_internals->core.run())
+ return false;
mp_internals->rpc.run();
daemonize::t_command_server* rpc_commands;