Skip to content

Commit

Permalink
Don't startup mining on sync after mining was stopped manually, evide…
Browse files Browse the repository at this point in the history
…ntly user doesn't want mining
  • Loading branch information
aivve committed Jan 14, 2022
1 parent 5bc36e5 commit 40047b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/MiningFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ void MiningFrame::stopSolo() {
m_ui->m_cpuDial->setEnabled(true);
}
m_solo_mining = false;
m_mining_was_stopped = true;
}
}

Expand All @@ -215,7 +216,7 @@ void MiningFrame::enableSolo() {
if (!m_solo_mining && !m_miner->is_mining()) {
m_ui->m_startSolo->setEnabled(true);
m_ui->m_stopSolo->setEnabled(false);
if (Settings::instance().isMiningOnLaunchEnabled() && m_sychronized) {
if (!m_mining_was_stopped && Settings::instance().isMiningOnLaunchEnabled() && m_sychronized) {
startSolo();
}
}
Expand Down
1 change: 1 addition & 0 deletions src/gui/MiningFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class MiningFrame : public QFrame {
bool m_wallet_closed = false;
bool m_solo_mining = false;
bool m_sychronized = false;
bool m_mining_was_stopped = false;

void walletOpened();
void walletClosed();
Expand Down

0 comments on commit 40047b1

Please sign in to comment.