Skip to content

Commit

Permalink
Block crawler and checkpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
halcyondev committed Aug 20, 2014
1 parent 2c7957b commit 4428a4f
Show file tree
Hide file tree
Showing 9 changed files with 952 additions and 18 deletions.
40 changes: 22 additions & 18 deletions halcyon-qt.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = halcyon-qt
VERSION = 1.0.0
VERSION = 1.0.1
INCLUDEPATH += src src/json src/qt
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
CONFIG += no_include_pwd
Expand All @@ -22,21 +22,22 @@ greaterThan(QT_MAJOR_VERSION, 4) {
windows:LIBS += -lshlwapi
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX

windows:LIBS += -lws2_32 -lole32 -loleaut32 -luuid -lgdi32
LIBS += -lboost_system-mgw48-mt-s-1_55 -lboost_filesystem-mgw48-mt-s-1_55 -lboost_program_options-mgw48-mt-s-1_55 -lboost_thread-mgw48-mt-s-1_55
BOOST_LIB_SUFFIX=-mgw48-mt-s-1_55
BOOST_INCLUDE_PATH=d:/deps/boost_1_55_0
BOOST_LIB_PATH=d:/deps/boost_1_55_0/stage/lib
BDB_INCLUDE_PATH=d:/deps/db-4.8.30.NC/build_unix
BDB_LIB_PATH=d:/deps/db-4.8.30.NC/build_unix
OPENSSL_INCLUDE_PATH=d:/deps/openssl-1.0.1i/include
OPENSSL_LIB_PATH=d:/deps/openssl-1.0.1i
MINIUPNPC_INCLUDE_PATH=d:/deps
LIBPNG_INCLUDE_PATH=d:/deps/libpng-1.6.9
LIBPNG_LIB_PATH=d:/deps/libpng-1.6.9/.libs
MINIUPNPC_LIB_PATH=d:/deps/miniupnpc
QRENCODE_INCLUDE_PATH=d:/deps/qrencode-3.4.3
QRENCODE_LIB_PATH=d:/deps/qrencode-3.4.3/.libs
windows:LIBS += -lboost_system-mgw48-mt-s-1_55 -lboost_filesystem-mgw48-mt-s-1_55 -lboost_program_options-mgw48-mt-s-1_55 -lboost_thread-mgw48-mt-s-1_55
windows:BOOST_LIB_SUFFIX=-mgw48-mt-s-1_55
windows:BOOST_INCLUDE_PATH=d:/deps/boost_1_55_0
windows:BOOST_LIB_PATH=d:/deps/boost_1_55_0/stage/lib
windows:BDB_INCLUDE_PATH=d:/deps/db-4.8.30.NC/build_unix
windows:BDB_LIB_PATH=d:/deps/db-4.8.30.NC/build_unix
windows:OPENSSL_INCLUDE_PATH=d:/deps/openssl-1.0.1i/include
windows:OPENSSL_LIB_PATH=d:/deps/openssl-1.0.1i
windows:MINIUPNPC_INCLUDE_PATH=d:/deps
windows:LIBPNG_INCLUDE_PATH=d:/deps/libpng-1.6.9
windows:LIBPNG_LIB_PATH=d:/deps/libpng-1.6.9/.libs
windows:MINIUPNPC_LIB_PATH=d:/deps/miniupnpc
windows:QRENCODE_INCLUDE_PATH=d:/deps/qrencode-3.4.3
windows:QRENCODE_LIB_PATH=d:/deps/qrencode-3.4.3/.libs



Expand Down Expand Up @@ -297,7 +298,8 @@ HEADERS += src/qt/bitcoingui.h \
src/sph_whirlpool.h \
src/sph_types.h \
src/threadsafety.h \
src/txdb-leveldb.h
src/txdb-leveldb.h \
src/qt/blockbrowser.h

SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/qt/transactiontablemodel.cpp \
Expand Down Expand Up @@ -366,7 +368,8 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/scrypt-x86.S \
src/scrypt-x86_64.S \
src/scrypt.cpp \
src/pbkdf2.cpp
src/pbkdf2.cpp \
src/qt/blockbrowser.cpp

RESOURCES += \
src/qt/bitcoin.qrc
Expand All @@ -383,7 +386,8 @@ FORMS += \
src/qt/forms/sendcoinsentry.ui \
src/qt/forms/askpassphrasedialog.ui \
src/qt/forms/rpcconsole.ui \
src/qt/forms/optionsdialog.ui
src/qt/forms/optionsdialog.ui \
src/qt/forms/blockbrowser.ui

contains(USE_QRCODE, 1) {
HEADERS += src/qt/qrcodedialog.h
Expand Down
1 change: 1 addition & 0 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Checkpoints
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 0, hashGenesisBlock )
(7500, uint256("18762e7833ffede57bff299c1469ffd2614a43e96024e614e74308d8aacfc0e8"))
;

// TestNet has no checkpoints
Expand Down
1 change: 1 addition & 0 deletions src/qt/bitcoin.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<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="block">res/icons/block.png</file>
</qresource>
<qresource prefix="/images">
<file alias="about">res/images/about.png</file>
Expand Down
20 changes: 20 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "guiutil.h"
#include "rpcconsole.h"
#include "wallet.h"
#include "blockbrowser.h"

#ifdef Q_OS_MAC
#include "macdockiconhandler.h"
Expand Down Expand Up @@ -103,6 +104,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):

// Create tabs
overviewPage = new OverviewPage();
blockBrowser = new BlockBrowser(this);

transactionsPage = new QWidget(this);
QVBoxLayout *vbox = new QVBoxLayout();
Expand All @@ -124,6 +126,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
centralWidget->addWidget(addressBookPage);
centralWidget->addWidget(receiveCoinsPage);
centralWidget->addWidget(sendCoinsPage);
centralWidget->addWidget(blockBrowser);
setCentralWidget(centralWidget);

// Create status bar
Expand Down Expand Up @@ -241,6 +244,12 @@ void BitcoinGUI::createActions()
addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
tabGroup->addAction(addressBookAction);

blockAction = new QAction(QIcon(":/icons/block"), tr("&Block Explorer"), this);
blockAction->setToolTip(tr("Explore the Theoremcoin Blockchain"));
blockAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
blockAction->setCheckable(true);
tabGroup->addAction(blockAction);

connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
Expand All @@ -251,6 +260,7 @@ void BitcoinGUI::createActions()
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage()));
connect(blockAction, SIGNAL(triggered()), this, SLOT(gotoBlockBrowser()));

quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
quitAction->setToolTip(tr("Quit application"));
Expand Down Expand Up @@ -342,6 +352,7 @@ void BitcoinGUI::createToolBars()
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
toolbar->addAction(blockAction);

QToolBar *toolbar2 = addToolBar(tr("Actions toolbar"));
toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
Expand Down Expand Up @@ -762,6 +773,15 @@ void BitcoinGUI::gotoVerifyMessageTab(QString addr)
signVerifyMessageDialog->setAddress_VM(addr);
}


void BitcoinGUI::gotoBlockBrowser()
{
blockAction->setChecked(true);
centralWidget->setCurrentWidget(blockBrowser);
exportAction->setEnabled(false);
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
}

void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
{
// Accept only URIs
Expand Down
5 changes: 5 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SendCoinsDialog;
class SignVerifyMessageDialog;
class Notificator;
class RPCConsole;
class BlockBrowser;

QT_BEGIN_NAMESPACE
class QLabel;
Expand Down Expand Up @@ -60,6 +61,7 @@ class BitcoinGUI : public QMainWindow
QStackedWidget *centralWidget;

OverviewPage *overviewPage;
BlockBrowser *blockBrowser;
QWidget *transactionsPage;
AddressBookPage *addressBookPage;
AddressBookPage *receiveCoinsPage;
Expand Down Expand Up @@ -93,6 +95,7 @@ class BitcoinGUI : public QMainWindow
QAction *lockWalletAction;
QAction *aboutQtAction;
QAction *openRPCConsoleAction;
QAction *blockAction;

QSystemTrayIcon *trayIcon;
Notificator *notificator;
Expand Down Expand Up @@ -151,6 +154,8 @@ private slots:
/** Show Sign/Verify Message dialog and switch to verify message tab */
void gotoVerifyMessageTab(QString addr = "");

void gotoBlockBrowser();

/** Show configuration dialog */
void optionsClicked();
/** Show about dialog */
Expand Down

0 comments on commit 4428a4f

Please sign in to comment.