diff --git a/src/clientversion.h b/src/clientversion.h index 525ec46..8f640f4 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -8,12 +8,12 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it // Set to true for release, false for prerelease or test build -#define CLIENT_VERSION_IS_RELEASE false +#define CLIENT_VERSION_IS_RELEASE true #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 6 #define CLIENT_VERSION_REVISION 6 -#define CLIENT_VERSION_BUILD 0 +#define CLIENT_VERSION_BUILD 3 // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! diff --git a/src/main.cpp b/src/main.cpp index 79a7a5f..f216321 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3071,14 +3071,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) cPeerBlockCounts.input(pfrom->nStartingHeight); - // Be more aggressive with blockchain download. Send new getblocks() message after connection - // to new node if waited longer than MAX_TIME_SINCE_BEST_BLOCK. - int TimeSinceBestBlock = GetTime() - nTimeBestReceived; - if (TimeSinceBestBlock > MAX_TIME_SINCE_BEST_BLOCK) { - printf("INFO: Waiting %d sec which is too long. Sending GetBlocks(0)\n", TimeSinceBestBlock); - pfrom->PushGetBlocks(pindexBest, uint256(0)); - } - // ppcoin: ask for pending sync-checkpoint if any if (!IsInitialBlockDownload()) Checkpoints::AskForPendingSyncCheckpoint(pfrom); diff --git a/src/main.h b/src/main.h index 21eb311..77f892c 100644 --- a/src/main.h +++ b/src/main.h @@ -43,7 +43,6 @@ static const unsigned int RWD_SWITCH_TIME = 1376006400; // August 9, 2013 00:00 static const int64 MAX_SPLIT_AMOUNT = 100 * COIN; static const int64 MAX_COMBINE_AMOUNT = MAX_SPLIT_AMOUNT; -static const int MAX_TIME_SINCE_BEST_BLOCK = 10; // how many seconds to wait before sending next PushGetBlocks() static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE; inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc index 4a7cddf..939ac53 100644 --- a/src/qt/bitcoin.qrc +++ b/src/qt/bitcoin.qrc @@ -1,6 +1,7 @@ res/icons/Philosopherstone-128.png + res/icons/phsorange.png res/icons/address-book.png res/icons/quit.png res/icons/send.png @@ -24,6 +25,11 @@ res/icons/add.png res/icons/Philosopherstone-128.png res/icons/Philosopherstone-16.png + res/icons/tsu.png + res/icons/cryptsy.png + res/icons/stones.png + res/icons/abe.png + res/icons/Qtlogo.png res/icons/edit.png res/icons/history.png res/icons/overview.png @@ -44,7 +50,7 @@ res/icons/debugwindow.png res/icons/staking_off.png res/icons/staking_on.png - res/images/walletlogo.png + res/images/phsblue.png res/icons/inspect.png res/icons/repair.png res/icons/import.png @@ -52,7 +58,6 @@ res/icons/transaction_conflicted.png - res/images/about.jpg res/images/phsblue.png diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index c4ba1ea..73296a3 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #if QT_VERSION < 0x050000 #include #else @@ -225,29 +226,45 @@ BitcoinGUI::~BitcoinGUI() void BitcoinGUI::createActions() { QActionGroup *tabGroup = new QActionGroup(this); - - overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this); - overviewAction->setStatusTip(tr("Show general overview of wallet")); + + actionTsu = new QAction(QIcon(":/icons/tsu"), tr(""), this); + actionTsu->setStatusTip(tr("Follow PHS on Tsu and get Paid!")); + actionTsu->setToolTip(actionTsu->statusTip()); + + actionStones = new QAction(QIcon(":/icons/stones"), tr(""), this); + actionStones->setStatusTip(tr("PHS Homepage")); + actionStones->setToolTip(actionStones->statusTip()); + + actionCryptsy = new QAction(QIcon(":/icons/cryptsy"), tr(""), this); + actionCryptsy->setStatusTip(tr("Buy and Sell PHS")); + actionCryptsy->setToolTip(actionCryptsy->statusTip()); + + actionAbe = new QAction(QIcon(":/icons/abe"), tr(""), this); + actionAbe->setStatusTip(tr("PHS Explorer")); + actionAbe->setToolTip(actionAbe->statusTip()); + + overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Home"), this); + overviewAction->setStatusTip(tr("Wallet Overview")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); - sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this); + sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send"), this); sendCoinsAction->setStatusTip(tr("Send coins to a Philosopherstone address")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); - receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive coins"), this); + receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive"), this); receiveCoinsAction->setStatusTip(tr("Show the list of addresses for receiving payments")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); - historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this); + historyAction = new QAction(QIcon(":/icons/history"), tr("&History"), this); historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); @@ -276,10 +293,10 @@ void BitcoinGUI::createActions() quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); - aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About Philosopherstone"), this); + aboutAction = new QAction(QIcon(":/icons/phsorange"), tr("&About Philosopherstone"), this); aboutAction->setStatusTip(tr("Show information about Philosopherstone")); aboutAction->setMenuRole(QAction::AboutRole); - aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this); + aboutQtAction = new QAction(QIcon(":/icons/qtlogo"), tr("About &Qt"), this); aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this); @@ -316,6 +333,7 @@ void BitcoinGUI::createActions() exportAction = new QAction(QIcon(":/icons/export"), tr("&Export..."), this); exportAction->setStatusTip(tr("Export the data in the current tab to a file")); exportAction->setToolTip(exportAction->statusTip()); + openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug window"), this); openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console")); openRPCConsoleAction->setToolTip(openRPCConsoleAction->statusTip()); @@ -394,6 +412,15 @@ void BitcoinGUI::createToolBars() QToolBar *toolbar2 = addToolBar(tr("Actions toolbar")); toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); toolbar2->addAction(exportAction); + toolbar2->addAction(actionTsu); + toolbar2->addAction(actionCryptsy); + toolbar2->addAction(actionStones); + toolbar2->addAction(actionAbe); + + connect(actionTsu, SIGNAL(triggered()), this, SLOT(openTsu())); + connect(actionCryptsy, SIGNAL(triggered()), this, SLOT(openCryptsy())); + connect(actionStones, SIGNAL(triggered()), this, SLOT(openStones())); + connect(actionAbe, SIGNAL(triggered()), this, SLOT(openAbe())); } void BitcoinGUI::setClientModel(ClientModel *clientModel) @@ -1313,3 +1340,19 @@ void BitcoinGUI::updateStakingIcon() } } } + +void BitcoinGUI::openTsu() { + QDesktopServices::openUrl(QUrl("https://www.tsu.co/philosopherstone")); +} + +void BitcoinGUI::openCryptsy() { + QDesktopServices::openUrl(QUrl("https://www.cryptsy.com/users/register?refid=8564")); +} + +void BitcoinGUI::openStones() { + QDesktopServices::openUrl(QUrl("http://phstones.com/")); +} + +void BitcoinGUI::openAbe() { + QDesktopServices::openUrl(QUrl("http://explorer.phstones.com/")); +} diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 911bb2c..25ca681 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -87,6 +87,10 @@ class BitcoinGUI : public QMainWindow QAction *optionsAction; QAction *toggleHideAction; QAction *exportAction; + QAction *actionTsu; + QAction *actionCryptsy; + QAction *actionStones; + QAction *actionAbe; QAction *encryptWalletAction; QAction *backupWalletAction; QAction *dumpWalletAction; @@ -209,6 +213,10 @@ private slots: void toggleHidden(); void updateStakingIcon(); + void openTsu(); + void openCryptsy(); + void openStones(); + void openAbe(); }; #endif diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index f1861b2..a15f665 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -6,8 +6,8 @@ 0 0 - 573 - 357 + 600 + 509 @@ -267,11 +267,29 @@ + + + 0 + 0 + + + + + 250 + 300 + + + + + 300 + 300 + + - :/icons/walletlogo + :/icons/splash false @@ -280,7 +298,10 @@ Qt::AlignCenter - -2 + -15 + + + 0 @@ -397,12 +418,24 @@ + + + 0 + 0 + + - 0 + 250 200 + + + 1000 + 1000 + + diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index be19c62..fae17ac 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -129,24 +129,18 @@ OverviewPage::OverviewPage(QWidget *parent) : showOutOfSyncWarning(true); if(GetBoolArg("-chart", true)) { - // setup Plot // create graph ui->diffplot->addGraph(); - // Argh can't get the background to work. - //QPixmap background = QPixmap(":/images/splash_testnet"); - //ui->diffplot->setBackground(background); - //ui->diffplot->setBackground(QBrush(QWidget::palette().color(this->backgroundRole()))); + // labels: + ui->diffplot->xAxis->setLabel("Block"); + ui->diffplot->yAxis->setLabel("NetWeight"); - // give the axes some labels: - ui->diffplot->xAxis->setLabel("Blocks"); - ui->diffplot->yAxis->setLabel("Difficulty"); - - // set the pens + // pens ui->diffplot->graph(0)->setPen(QPen(QColor(40, 110, 173))); ui->diffplot->graph(0)->setLineStyle(QCPGraph::lsLine); - // set axes label fonts: + // axes label fonts: QFont label = font(); ui->diffplot->xAxis->setLabelFont(label); ui->diffplot->yAxis->setLabelFont(label); @@ -171,9 +165,8 @@ OverviewPage::~OverviewPage() void OverviewPage::updatePlot(int count) { static int64_t lastUpdate = 0; - // Double Check to make sure we don't try to update the plot when it is disabled if(!GetBoolArg("-chart", true)) { return; } - if (GetTime() - lastUpdate < 180) { return; } // This is just so it doesn't redraw rapidly during syncing + if (GetTime() - lastUpdate < 180) { return; } bool fProofOfStake = (nBestHeight > LAST_POW_BLOCK + 100); @@ -182,7 +175,7 @@ void OverviewPage::updatePlot(int count) else ui->diffplot->yAxis->setLabel("Difficulty"); - int numLookBack = 1296; + int numLookBack = 3024; double diffMax = 0; const CBlockIndex* pindex = GetLastBlockIndex(pindexBest, fProofOfStake); int height = pindex->nHeight; diff --git a/src/qt/res/icons/phsblue.gif b/src/qt/res/icons/phsblue.gif deleted file mode 100644 index f7675db..0000000 Binary files a/src/qt/res/icons/phsblue.gif and /dev/null differ diff --git a/src/qt/res/icons/phsorange.png b/src/qt/res/icons/phsorange.png new file mode 100644 index 0000000..573cf21 Binary files /dev/null and b/src/qt/res/icons/phsorange.png differ diff --git a/src/qt/res/icons/stones.png b/src/qt/res/icons/stones.png index 5414855..2c71473 100644 Binary files a/src/qt/res/icons/stones.png and b/src/qt/res/icons/stones.png differ diff --git a/src/qt/res/icons/tx_mined.png b/src/qt/res/icons/tx_mined.png index 86aad11..be8ee7e 100644 Binary files a/src/qt/res/icons/tx_mined.png and b/src/qt/res/icons/tx_mined.png differ diff --git a/src/qt/res/images/phsblue.png b/src/qt/res/images/phsblue.png index b49f6e5..1dafafb 100644 Binary files a/src/qt/res/images/phsblue.png and b/src/qt/res/images/phsblue.png differ diff --git a/src/version.cpp b/src/version.cpp index d4dde63..75723a5 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -11,7 +11,7 @@ const std::string CLIENT_NAME("Satoshi"); // Client version number -#define CLIENT_VERSION_SUFFIX "Beta" +#define CLIENT_VERSION_SUFFIX "" // The following part of the code determines the CLIENT_BUILD variable. @@ -36,14 +36,16 @@ const std::string CLIENT_NAME("Satoshi"); // git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$ #ifdef GIT_ARCHIVE # define GIT_COMMIT_ID "$Format:%h$" -# define GIT_COMMIT_DATE "$Format:%cD$" +# define GIT_COMMIT_DATE "$Format:%cD" #endif +#define STRINGIFY(s) #s + #define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \ - "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-g" commit + "v" STRINGIFY(maj) "." STRINGIFY(min) "." STRINGIFY(rev) "." STRINGIFY(build) "-g" commit #define BUILD_DESC_FROM_UNKNOWN(maj,min,rev,build) \ - "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk" + "v" STRINGIFY(maj) "." STRINGIFY(min) "." STRINGIFY(rev) "." STRINGIFY(build) "" #ifndef BUILD_DESC # ifdef GIT_COMMIT_ID diff --git a/src/wallet.cpp b/src/wallet.cpp index edc3d2c..ab2f375 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1651,7 +1651,6 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int // The following split & combine thresholds are important to security // Should not be adjusted if you don't understand the consequences static unsigned int nStakeSplitAge = (60 * 60 * 24 * 30); - const CBlockIndex* pIndex0 = GetLastBlockIndex(pindexBest, false); CBlockIndex* pindexPrev = pindexBest; CBigNum bnTargetPerCoinDay;