summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevoskuil <eric@voskuil.org>2014-03-25 06:22:22 (GMT)
committer evoskuil <eric@voskuil.org>2014-03-25 06:22:22 (GMT)
commit6bdc35f69919b4cef778d1c2355aa42fa3d73197 (patch)
treeb5cd5fa519260138e3c069c20658f5e0ec690e48
parent3dd0cf9dec031e519991fb2f39820d1e69639a3a (diff)
Cosmetic
-rw-r--r--src/worker/config.cpp3
-rw-r--r--src/worker/main.cpp14
2 files changed, 9 insertions, 8 deletions
diff --git a/src/worker/config.cpp b/src/worker/config.cpp
index b16b4b0..e6d6051 100644
--- a/src/worker/config.cpp
+++ b/src/worker/config.cpp
@@ -82,7 +82,8 @@ tstring system_config_directory()
}
#endif
-void set_config_path(libconfig::Config& configuration, const tpath& config_path)
+void set_config_path(libconfig::Config& configuration,
+ const tpath& config_path)
{
// Ignore error if unable to read config file.
try
diff --git a/src/worker/main.cpp b/src/worker/main.cpp
index 7e1b053..0495a9a 100644
--- a/src/worker/main.cpp
+++ b/src/worker/main.cpp
@@ -28,7 +28,7 @@ void interrupt_handler(int)
int tmain(int argc, tchar* argv[])
{
- config_type configuration;
+ config_type config;
tpath config_path = argc < 2 ?
tpath(system_config_directory()) / "obelisk" / "worker.cfg" :
tpath(argv[1]);
@@ -36,18 +36,18 @@ int tmain(int argc, tchar* argv[])
// libconfig is ANSI/MBCS on Windows - no Unicode support.
// This translates the path from Unicode to a "generic" path in
// ANSI/MBCS, which can result in failures.
- load_config(configuration, config_path);
+ load_config(config, config_path);
echo() << "Press CTRL-C to shut down.";
// Create worker.
request_worker worker;
- worker.start(configuration);
+ worker.start(config);
// Fullnode
node_impl node;
// Publisher
publisher publish(node);
- if (configuration.publisher_enabled)
- if (!publish.start(configuration))
+ if (config.publisher_enabled)
+ if (!publish.start(config))
{
std::cerr << "Failed to start publisher: "
<< zmq_strerror(zmq_errno()) << std::endl;
@@ -86,7 +86,7 @@ int tmain(int argc, tchar* argv[])
transaction_pool_fetch_transaction);
// Start the node last so that all subscriptions to new blocks
// don't miss anything.
- if (!node.start(configuration))
+ if (!node.start(config))
{
std::cerr << "Failed to start Bitcoin node." << std::endl;
return 1;
@@ -97,7 +97,7 @@ int tmain(int argc, tchar* argv[])
while (!stopped)
worker.update();
worker.stop();
- if (configuration.publisher_enabled)
+ if (config.publisher_enabled)
publish.stop();
if (!node.stop())
return -1;