Skip to content

Commit

Permalink
Revert "Merge pull request #377 from Max-Meldrum/cleanup"
Browse files Browse the repository at this point in the history
This reverts commit b5d9e53, reversing
changes made to df57d5e.
  • Loading branch information
justinvforvendetta committed Jan 8, 2018
1 parent b5d9e53 commit 6ad6e43
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
21 changes: 20 additions & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,26 @@ void static ProcessOneShot()
}
}

// ppcoin: stake minter thread
void static ThreadStakeMinter(void* parg)
{
printf("ThreadStakeMinter started\n");
CWallet* pwallet = (CWallet*)parg;
try
{
vnThreadsRunning[THREAD_MINTER]++;
VERGEMiner(pwallet, true);
vnThreadsRunning[THREAD_MINTER]--;
}
catch (std::exception& e) {
vnThreadsRunning[THREAD_MINTER]--;
PrintException(&e, "ThreadStakeMinter()");
} catch (...) {
vnThreadsRunning[THREAD_MINTER]--;
PrintException(NULL, "ThreadStakeMinter()");
}
printf("ThreadStakeMinter exiting, %d threads remaining\n", vnThreadsRunning[THREAD_MINTER]);
}

void ThreadOpenConnections2(void* parg)
{
Expand Down Expand Up @@ -1844,7 +1864,6 @@ void StartNode(void* parg)
printf("Error; NewThread(ThreadDumpAddress) failed\n");

// ppcoin: mint proof-of-stake blocks in the background
// TODO: remove? or use ThreadVERGEMiner in main.cpp as it is a duplicated function of ThreadStakeMinter?
//if (!NewThread(ThreadStakeMinter, pwalletMain))
// printf("Error: NewThread(ThreadStakeMinter) failed\n");

Expand Down
2 changes: 0 additions & 2 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ void SendCoinsDialog::on_sendButton_clicked()
tr("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."),
QMessageBox::Ok, QMessageBox::Ok);
break;
case WalletModel::NarrationTooLong: //nothing to do? Added to avoid compiler warning
break;
case WalletModel::Aborted: // User aborted, nothing to do
break;
case WalletModel::OK:
Expand Down
1 change: 1 addition & 0 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ bool CWallet::Unlock(const SecureString& strWalletPassphrase)

bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase)
{
bool fWasLocked = IsLocked();

{
LOCK(cs_wallet);
Expand Down

0 comments on commit 6ad6e43

Please sign in to comment.