From b8089e637aa85d8ca42eb83a45710f2a39423171 Mon Sep 17 00:00:00 2001 From: XMRig Date: Fri, 16 Jun 2017 11:32:34 +0300 Subject: [PATCH] Print pool urls in summary. --- src/Summary.cpp | 38 +++++++++++++++++++++++--------------- src/version.h | 2 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/Summary.cpp b/src/Summary.cpp index 8db808933..8f917d442 100644 --- a/src/Summary.cpp +++ b/src/Summary.cpp @@ -28,6 +28,7 @@ #include "Console.h" #include "Cpu.h" #include "Mem.h" +#include "net/Url.h" #include "Options.h" #include "Summary.h" #include "version.h" @@ -99,22 +100,28 @@ static void print_threads() buf[0] = '\0'; } - if (Options::i()->colors()) { - Console::i()->text("\x1B[01;32m * \x1B[01;37mTHREADS: \x1B[01;36m%d\x1B[01;37m, %s, av=%d, donate=%d%%%s%s", - Options::i()->threads(), - Options::i()->algoName(), - Options::i()->algoVariant(), - Options::i()->donateLevel(), - Options::i()->nicehash() ? ", nicehash" : "", buf); - } - else { - Console::i()->text(" * THREADS: %d, %s, av=%d, donate=%d%%%s%s", - Options::i()->threads(), - Options::i()->algoName(), - Options::i()->algoVariant(), - Options::i()->donateLevel(), - Options::i()->nicehash() ? ", nicehash" : "", buf); + Console::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mTHREADS: \x1B[01;36m%d\x1B[01;37m, %s, av=%d, donate=%d%%%s%s" : " * THREADS: %d, %s, av=%d, donate=%d%%%s%s", + Options::i()->threads(), + Options::i()->algoName(), + Options::i()->algoVariant(), + Options::i()->donateLevel(), + Options::i()->nicehash() ? ", nicehash" : "", buf); +} + + +static void print_pools() +{ + Console::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mPOOL #1: \x1B[01;36m%s:%d" : " * POOL #1: %s:%d", + Options::i()->url()->host(), + Options::i()->url()->port()); + + if (!Options::i()->backupUrl()) { + return; } + + Console::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mPOOL #2: \x1B[01;36m%s:%d" : " * POOL #2: %s:%d", + Options::i()->backupUrl()->host(), + Options::i()->backupUrl()->port()); } @@ -124,6 +131,7 @@ void Summary::print() print_memory(); print_cpu(); print_threads(); + print_pools(); } diff --git a/src/version.h b/src/version.h index 326b65672..8dc9a1074 100644 --- a/src/version.h +++ b/src/version.h @@ -27,7 +27,7 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "Monero (XMR) CPU miner" -#define APP_VERSION "1.0.0-dev" +#define APP_VERSION "1.0.0" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2017 xmrig.com"