Skip to content

Commit

Permalink
new arg --pow-end-at-startup to run pow-end command at zilminer start…
Browse files Browse the repository at this point in the history
…up, default is false
  • Loading branch information
deepgully committed Feb 15, 2019
1 parent e6f0ec2 commit 458b070
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ethminer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ class MinerCLI
app.add_option("--pow-start", m_PoolSettings.sysCallbackPoWStart, "");
app.add_option("--pow-end", m_PoolSettings.sysCallbackPoWEnd, "");
app.add_flag("--clear-dag", m_PoolSettings.clearDAGPoWEnd, "");
app.add_flag("--pow-end-at-startup", m_PoolSettings.callPoWEndAtStartup, "");

// Exception handling is held at higher level
app.parse(argc, argv);
Expand Down
5 changes: 4 additions & 1 deletion libpoolprotocols/PoolManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ PoolManager::PoolManager(PoolSettings _settings)
});

// start other miner if set
runSystemCommand(m_Settings.sysCallbackPoWEnd, true);
if (m_Settings.callPoWEndAtStartup)
{
runSystemCommand(m_Settings.sysCallbackPoWEnd, true);
}

DEV_BUILD_LOG_PROGRAMFLOW(cnote, "PoolManager::PoolManager() end");
}
Expand Down
1 change: 1 addition & 0 deletions libpoolprotocols/PoolManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct PoolSettings
std::string sysCallbackPoWStart = ""; // system command to call when PoW start
std::string sysCallbackPoWEnd = ""; // system command to call when PoW end
bool clearDAGPoWEnd = false; // release GPU memory when PoW end
bool callPoWEndAtStartup = false; // call pow-end system command at startup
};

class PoolManager
Expand Down

0 comments on commit 458b070

Please sign in to comment.