Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ std::string HelpMessage()
" -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n" +
" -bind=<addr> " + _("Bind to given address. Use [host]:port notation for IPv6") + "\n" +
" -dnsseed " + _("Find peers using DNS lookup (default: 1)") + "\n" +
" -staking " + _("Stake your coins to support network and gain reward (default: 1)") + "\n" +
" -nosynccheckpoints " + _("Disable sync checkpoints (default: 0)") + "\n" +
" -banscore=<n> " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" +
" -bantime=<n> " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" +
Expand Down
7 changes: 5 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1886,8 +1886,11 @@ void StartNode(void* parg)
printf("Error; NewThread(ThreadDumpAddress) failed\n");

// ppcoin: mint proof-of-stake blocks in the background
if (!NewThread(ThreadStakeMinter, pwalletMain))
printf("Error: NewThread(ThreadStakeMinter) failed\n");
if (!GetBoolArg("-staking", true))
printf("Staking disabled\n");
else
if (!NewThread(ThreadStakeMinter, pwalletMain))
printf("Error: NewThread(ThreadStakeMinter) failed\n");

// Generate coins in the background
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain);
Expand Down
17 changes: 10 additions & 7 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,16 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
labelMintingIcon->setPixmap(QIcon(":/icons/minting").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelMintingIcon->setEnabled(false);
// Add timer to update minting icon
QTimer *timerMintingIcon = new QTimer(labelMintingIcon);
timerMintingIcon->start(MODEL_UPDATE_DELAY);
connect(timerMintingIcon, SIGNAL(timeout()), this, SLOT(updateMintingIcon()));
// Add timer to update minting weights
QTimer *timerMintingWeights = new QTimer(labelMintingIcon);
timerMintingWeights->start(30 * 1000);
connect(timerMintingWeights, SIGNAL(timeout()), this, SLOT(updateMintingWeights()));
if (GetBoolArg("-staking", true))
{
QTimer *timerMintingIcon = new QTimer(labelMintingIcon);
timerMintingIcon->start(MODEL_UPDATE_DELAY);
connect(timerMintingIcon, SIGNAL(timeout()), this, SLOT(updateMintingIcon()));
// Add timer to update minting weights
QTimer *timerMintingWeights = new QTimer(labelMintingIcon);
timerMintingWeights->start(30 * 1000);
connect(timerMintingWeights, SIGNAL(timeout()), this, SLOT(updateMintingWeights()));
}
// Set initial values for user and network weights
nWeight, nNetworkWeight = 0;

Expand Down