mirror of
https://github.com/xmrig/xmrig.git
synced 2025-02-02 03:06:30 +00:00
Added support to build without API.
This commit is contained in:
parent
325e116624
commit
fd98dc236a
3 changed files with 9 additions and 0 deletions
|
@ -100,7 +100,10 @@ App::~App()
|
|||
{
|
||||
uv_tty_reset_mode();
|
||||
|
||||
# ifndef XMRIG_NO_HTTPD
|
||||
delete m_httpd;
|
||||
# endif
|
||||
|
||||
delete m_console;
|
||||
}
|
||||
|
||||
|
@ -125,7 +128,9 @@ int App::exec()
|
|||
Mem::allocate(m_options->algo(), m_options->threads(), m_options->doubleHash(), m_options->hugePages());
|
||||
Summary::print();
|
||||
|
||||
# ifndef XMRIG_NO_API
|
||||
Api::start();
|
||||
# endif
|
||||
|
||||
# ifndef XMRIG_NO_HTTPD
|
||||
m_httpd = new Httpd(m_options->apiPort(), m_options->apiToken());
|
||||
|
|
|
@ -183,7 +183,9 @@ void Network::tick()
|
|||
m_donate->tick(now);
|
||||
}
|
||||
|
||||
# ifndef XMRIG_NO_API
|
||||
Api::tick(m_state);
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -194,5 +194,7 @@ void Workers::onTick(uv_timer_t *handle)
|
|||
m_hashrate->updateHighest();
|
||||
}
|
||||
|
||||
# ifndef XMRIG_NO_API
|
||||
Api::tick(m_hashrate);
|
||||
# endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue