Skip to content

Commit

Permalink
Merge pull request #12 from palmd/master
Browse files Browse the repository at this point in the history
1.6.6.3 Release
  • Loading branch information
palmd committed Dec 11, 2014
2 parents 69a3f63 + 5bc8529 commit f0f1bbe
Show file tree
Hide file tree
Showing 15 changed files with 119 additions and 45 deletions.
4 changes: 2 additions & 2 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
8 changes: 0 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
9 changes: 7 additions & 2 deletions src/qt/bitcoin.qrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<RCC>
<qresource prefix="/icons">
<file alias="bitcoin">res/icons/Philosopherstone-128.png</file>
<file alias="phsorange">res/icons/phsorange.png</file>
<file alias="address-book">res/icons/address-book.png</file>
<file alias="quit">res/icons/quit.png</file>
<file alias="send">res/icons/send.png</file>
Expand All @@ -24,6 +25,11 @@
<file alias="add">res/icons/add.png</file>
<file alias="bitcoin_testnet">res/icons/Philosopherstone-128.png</file>
<file alias="toolbar_testnet">res/icons/Philosopherstone-16.png</file>
<file alias="tsu">res/icons/tsu.png</file>
<file alias="cryptsy">res/icons/cryptsy.png</file>
<file alias="stones">res/icons/stones.png</file>
<file alias="abe">res/icons/abe.png</file>
<file alias="qtlogo">res/icons/Qtlogo.png</file>
<file alias="edit">res/icons/edit.png</file>
<file alias="history">res/icons/history.png</file>
<file alias="overview">res/icons/overview.png</file>
Expand All @@ -44,15 +50,14 @@
<file alias="debugwindow">res/icons/debugwindow.png</file>
<file alias="staking_off">res/icons/staking_off.png</file>
<file alias="staking_on">res/icons/staking_on.png</file>
<file alias="walletlogo">res/images/walletlogo.png</file>
<file alias="splash">res/images/phsblue.png</file>
<file alias="inspect">res/icons/inspect.png</file>
<file alias="repair">res/icons/repair.png</file>
<file alias="import">res/icons/import.png</file>
<file alias="export2">res/icons/export2.png</file>
<file alias="transaction_conflicted">res/icons/transaction_conflicted.png</file>
</qresource>
<qresource prefix="/images">
<file alias="about">res/images/about.jpg</file>
<file alias="splash">res/images/phsblue.png</file>
</qresource>
<qresource prefix="/movies">
Expand Down
59 changes: 51 additions & 8 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <QDateTime>
#include <QMovie>
#include <QFileDialog>
#include <QDesktopServices>
#if QT_VERSION < 0x050000
#include <QDesktopServices>
#else
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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/"));
}
8 changes: 8 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -209,6 +213,10 @@ private slots:
void toggleHidden();

void updateStakingIcon();
void openTsu();
void openCryptsy();
void openStones();
void openAbe();
};

#endif
43 changes: 38 additions & 5 deletions src/qt/forms/overviewpage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>573</width>
<height>357</height>
<width>600</width>
<height>509</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -267,11 +267,29 @@
</item>
<item>
<widget class="QLabel" name="label_wallet_bgcoin">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>300</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../bitcoin.qrc">:/icons/walletlogo</pixmap>
<pixmap resource="../bitcoin.qrc">:/icons/splash</pixmap>
</property>
<property name="scaledContents">
<bool>false</bool>
Expand All @@ -280,7 +298,10 @@
<set>Qt::AlignCenter</set>
</property>
<property name="margin">
<number>-2</number>
<number>-15</number>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
</item>
Expand Down Expand Up @@ -397,12 +418,24 @@
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCustomPlot" name="diffplot" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<width>250</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>1000</width>
<height>1000</height>
</size>
</property>
</widget>
</item>
</layout>
Expand Down
21 changes: 7 additions & 14 deletions src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand All @@ -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;
Expand Down
Binary file removed src/qt/res/icons/phsblue.gif
Binary file not shown.
Binary file added src/qt/res/icons/phsorange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/stones.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/icons/tx_mined.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/qt/res/images/phsblue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f0f1bbe

Please sign in to comment.