Skip to content

Commit

Permalink
V2.2.6 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
nnian committed May 31, 2018
1 parent d524ad6 commit 7b18203
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 41 deletions.
19 changes: 8 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ endif(WIN32)

find_package(Boost 1.55 REQUIRED COMPONENTS date_time filesystem program_options regex serialization system thread chrono)
if ((${Boost_MAJOR_VERSION} EQUAL 1) AND (${Boost_MINOR_VERSION} EQUAL 54))
message(SEND_ERROR "Boost version 1.54 is unsupported, more details are available here http://goo.gl/RrCFmA")
message(SEND_ERROR "Boost version 1.54 is unsupported, more details are available here http://goo.gl/RrCFmA")
endif ()

include_directories(${Boost_INCLUDE_DIRS})
Expand Down Expand Up @@ -77,18 +77,14 @@ set(CRYPTONOTE_SOURCES
cryptonote/src/crypto/crypto-ops.c
cryptonote/src/crypto/crypto.cpp
cryptonote/src/crypto/groestl.c
cryptonote/src/crypto/hash-extra-blake.c
cryptonote/src/crypto/hash-extra-groestl.c
cryptonote/src/crypto/hash-extra-jh.c
cryptonote/src/crypto/hash-extra-skein.c
cryptonote/src/crypto/hash.c
cryptonote/src/crypto/jh.c
cryptonote/src/crypto/keccak.c
cryptonote/src/crypto/oaes_lib.c
cryptonote/src/crypto/random.c
cryptonote/src/crypto/skein.c
cryptonote/src/crypto/slow-hash.c
cryptonote/src/crypto/slow-hash.cpp
cryptonote/src/crypto/cn_slow_hash_soft.cpp
cryptonote/src/crypto/cn_slow_hash_hard_intel.cpp
cryptonote/src/crypto/cn_slow_hash_hard_arm.cpp
cryptonote/src/crypto/tree-hash.c
cryptonote/src/CryptoNoteCore/BlockchainIndices.cpp
cryptonote/src/CryptoNoteCore/BlockchainMessages.cpp
Expand Down Expand Up @@ -178,6 +174,7 @@ set(CRYPTONOTE_SOURCES

file(GLOB_RECURSE SOURCES src/*.cpp)
file(GLOB_RECURSE HEADERS src/*.h)
file(GLOB_RECURSE HEADERS src/*.hpp)
file(GLOB_RECURSE FORMS src/gui/ui/*.ui)
file(GLOB_RECURSE Mnemonics cryptonote/src/mnemonics/*)

Expand All @@ -189,11 +186,11 @@ qt5_add_resources(RCC ${QRC})

if (WIN32)
if (NOT MSVC)
message(FATAL_ERROR "Only MSVC is supported on this platform")
message(FATAL_ERROR "Only MSVC is supported on this platform")
endif ()
add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600 /DSTATICLIB)
include_directories(cryptonote/src/platform/msc)

set( CMAKE_CXX_FLAGS "-bigobj -EHsc")
set(PLATFORM_DIR Windows)
set(BUILD_PLATFORM WIN32)
set(BUILD_RESOURCES src/cryptonotewallet.rc)
Expand Down Expand Up @@ -226,7 +223,7 @@ elseif (UNIX)

set(BUILD_PLATFORM MACOSX_BUNDLE)
set(BUILD_RESOURCES ${APPLICATION_ICON})
GET_TARGET_PROPERTY(QT_LIB_DIR "${Qt5Widgets_LIBRARIES}" LOCATION)
GET_FILENAME_COMPONENT(QT_LIB_DIR "${QT_LIB_DIR}" PATH)
else(APPLE)
Expand Down
3 changes: 1 addition & 2 deletions CryptoNoteWallet.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

set(CN_PROJECT_NAME "Qwertycoin")
set(CN_CURRENCY_DISPLAY_NAME "Qwertycoin")
set(CN_CURRENCY_TICKER "QWC")
set(CN_VERSION 2.2.2)
set(CN_VERSION 2.2.6)
17 changes: 16 additions & 1 deletion src/CryptoNoteWrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016-2017 The Karbowanec developers
// Copyright (c) 2018 The Qwertycoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -398,6 +397,14 @@ class RpcNode : CryptoNote::INodeObserver, public Node {
}
}

CryptoNote::BlockHeaderInfo getLastLocalBlockHeaderInfo() {
return m_node.getLastLocalBlockHeaderInfo();
}

uint8_t getCurrentBlockMajorVersion() {
return getLastLocalBlockHeaderInfo().majorVersion;
}

CryptoNote::IWalletLegacy* createWallet() override {
return new CryptoNote::WalletLegacy(m_currency, m_node, m_logManager);
}
Expand Down Expand Up @@ -556,6 +563,14 @@ class InprocessNode : CryptoNote::INodeObserver, public Node {
return m_nodeServer.getPeerlistManager().get_gray_peers_count();
}

CryptoNote::BlockHeaderInfo getLastLocalBlockHeaderInfo() {
return m_node.getLastLocalBlockHeaderInfo();
}

uint8_t getCurrentBlockMajorVersion() {
return getLastLocalBlockHeaderInfo().majorVersion;
}

CryptoNote::IWalletLegacy* createWallet() override {
return new CryptoNote::WalletLegacy(m_currency, m_node, m_logManager);
}
Expand Down
4 changes: 3 additions & 1 deletion src/CryptoNoteWrapper.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016-2017 The Karbowanec developers
// Copyright (c) 2018 The Qwertycoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand All @@ -10,6 +9,7 @@
#include <memory>
#include <string>
#include <system_error>
#include <INode.h>

namespace CryptoNote {

Expand Down Expand Up @@ -48,6 +48,8 @@ class Node {
virtual uint64_t getIncomingConnectionsCount() = 0;
virtual uint64_t getWhitePeerlistSize() = 0;
virtual uint64_t getGreyPeerlistSize() = 0;
virtual uint8_t getCurrentBlockMajorVersion() = 0;
virtual CryptoNote::BlockHeaderInfo getLastLocalBlockHeaderInfo() = 0;

virtual void startMining(const std::string& address, size_t threads_count) = 0;
virtual void stopMining() = 0;
Expand Down
9 changes: 8 additions & 1 deletion src/NodeAdapter.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016-2017 The Karbowanec developers
// Copyright (c) 2018 The Qwertycoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -264,6 +263,14 @@ quint64 NodeAdapter::getGreyPeerlistSize() {
return m_node->getGreyPeerlistSize();
}

CryptoNote::BlockHeaderInfo NodeAdapter::getLastLocalBlockHeaderInfo() {
return m_node->getLastLocalBlockHeaderInfo();
}

uint8_t NodeAdapter::getCurrentBlockMajorVersion() {
return getLastLocalBlockHeaderInfo().majorVersion;
}

void NodeAdapter::peerCountUpdated(Node& _node, size_t _count) {
Q_UNUSED(_node);
Q_EMIT peerCountUpdatedSignal(_count);
Expand Down
3 changes: 2 additions & 1 deletion src/NodeAdapter.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016-2017 The Karbowanec developers
// Copyright (c) 2018 The Qwertycoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -53,6 +52,8 @@ class NodeAdapter : public QObject, public INodeCallback {
quint64 getIncomingConnectionsCount();
quint64 getWhitePeerlistSize();
quint64 getGreyPeerlistSize();
uint8_t getCurrentBlockMajorVersion();
CryptoNote::BlockHeaderInfo getLastLocalBlockHeaderInfo();
void peerCountUpdated(Node& _node, size_t _count) Q_DECL_OVERRIDE;
void localBlockchainUpdated(Node& _node, uint64_t _height) Q_DECL_OVERRIDE;
void lastKnownBlockHeightUpdated(Node& _node, uint64_t _height) Q_DECL_OVERRIDE;
Expand Down
2 changes: 1 addition & 1 deletion src/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void Settings::load() {
}

QStringList defaultPoolList;
defaultPoolList << "qwertycoin.site:3333";
defaultPoolList << "qwertycoin.site:3333" << "qwcpool.partyvibe.com:2000" << "qwerty.mineallcrypto.com:6076";
if (!m_settings.contains(OPTION_MINING_POOLS)) {
setMiningPoolList(QStringList() << defaultPoolList);
} else {
Expand Down
15 changes: 13 additions & 2 deletions src/Worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include <QThread>

#include <crypto/hash.h>
#include <crypto/cn_slow_hash.hpp>
#include "NodeAdapter.h"
#include "CryptoNoteWrapper.h"
#include <CryptoNoteConfig.h>

#include "Worker.h"

Expand All @@ -32,7 +36,6 @@ void Worker::run() {
Job localJob;
quint32 localNonce;
Crypto::Hash hash;
Crypto::cn_context context;
while (!m_isStopped) {
{
QReadLocker lock(&m_jobLock);
Expand All @@ -50,7 +53,15 @@ void Worker::run() {
localNonce = ++m_nonce;
localJob.blob.replace(39, sizeof(localNonce), reinterpret_cast<char*>(&localNonce), sizeof(localNonce));
std::memset(&hash, 0, sizeof(hash));
Crypto::cn_slow_hash(context, localJob.blob.data(), localJob.blob.size(), hash);
cn_pow_hash_v2 ctx;
if (NodeAdapter::instance().getCurrentBlockMajorVersion() < CryptoNote::BLOCK_MAJOR_VERSION_4) {
cn_pow_hash_v1 ctx_v1 = cn_pow_hash_v1::make_borrowed(ctx);
ctx_v1.hash(localJob.blob.data(), localJob.blob.size(), hash.data);
}
else {
ctx.hash(localJob.blob.data(), localJob.blob.size(), hash.data);
}

++m_hashCounter;
if (Q_UNLIKELY(((quint32*)&hash)[7] < localJob.target)) {
m_observer->processShare(localJob.jobId, localNonce, QByteArray(reinterpret_cast<char*>(&hash), sizeof(hash)));
Expand Down
10 changes: 5 additions & 5 deletions src/cryptonotewallet.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ IDI_ICON1 ICON "images\qwertycoinz.ico"

#include <windows.h>

#define VER_FILEVERSION 1,0,0,7
#define VER_FILEVERSION_STR "1.0.0.7\0"
#define VER_PRODUCTVERSION 2,2,3
#define VER_PRODUCTVERSION_STR "2.2.3\0"
#define VER_FILEVERSION 2,2,6,0
#define VER_FILEVERSION_STR "2.2.6.0\0"
#define VER_PRODUCTVERSION 2,2,6
#define VER_PRODUCTVERSION_STR "2.2.6\0"
#define VER_FILEDESCRIPTION_STR "Qwertycoin"
#define VER_INTERNALNAME_STR "Qwertycoin"
#define VER_LEGALCOPYRIGHT_STR "Copyright (C) 2018, Qwertycoin Developers"
#define VER_LEGALCOPYRIGHT_STR "Copyright (C) 2017-2018, The Qwertycoin Group"
#define VER_ORIGINALFILENAME_STR "Qwertycoin.exe"
#define VER_PRODUCTNAME_STR "Qwertycoin"

Expand Down
23 changes: 11 additions & 12 deletions src/gui/SendFrame.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2015-2016 XDN developers
// Copyright (c) 2016-2017 The Karbowanec developers
// Copyright (c) 2018 The Qwertycoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -39,15 +38,15 @@ SendFrame::SendFrame(QWidget* _parent) : QFrame(_parent), m_ui(new Ui::SendFrame
connect(&WalletAdapter::instance(), &WalletAdapter::walletActualBalanceUpdatedSignal, this, &SendFrame::walletActualBalanceUpdated,
Qt::QueuedConnection);
connect(&WalletAdapter::instance(), &WalletAdapter::walletCloseCompletedSignal, this, &SendFrame::reset);
connect(&WalletAdapter::instance(), &WalletAdapter::walletSynchronizationCompletedSignal, this, &SendFrame::walletSynchronized,
Qt::QueuedConnection);
connect(&WalletAdapter::instance(), &WalletAdapter::walletSynchronizationCompletedSignal, this, &SendFrame::walletSynchronized
, Qt::QueuedConnection);
connect(&WalletAdapter::instance(), &WalletAdapter::walletSynchronizationProgressUpdatedSignal,
this, &SendFrame::walletSynchronizationInProgress, Qt::QueuedConnection);

m_ui->m_tickerLabel->setText(CurrencyAdapter::instance().getCurrencyTicker().toUpper());
m_ui->m_feeSpin->setSuffix(" " + CurrencyAdapter::instance().getCurrencyTicker().toUpper());
m_ui->m_donateSpin->setSuffix(" " + CurrencyAdapter::instance().getCurrencyTicker().toUpper());
m_ui->m_feeSpin->setMinimum(CurrencyAdapter::instance().formatAmount(CurrencyAdapter::instance().getMinimumFee()).toDouble());

m_ui->m_remote_label->hide();
m_ui->m_sendButton->setEnabled(false);

Expand All @@ -65,7 +64,7 @@ SendFrame::SendFrame(QWidget* _parent) : QFrame(_parent), m_ui(new Ui::SendFrame
}

SendFrame::~SendFrame() {
m_transfers.clear();
m_transfers.clear();
m_glassFrame->deleteLater();
}

Expand Down Expand Up @@ -109,8 +108,7 @@ void SendFrame::clearAllClicked() {
addRecipientClicked();
amountValueChange();
m_ui->m_paymentIdEdit->clear();
m_ui->m_mixinSlider->setValue(1);
m_ui->m_feeSpin->setValue(m_ui->m_feeSpin->minimum());
m_ui->m_mixinSlider->setValue(5);
}

void SendFrame::reset() {
Expand Down Expand Up @@ -140,11 +138,11 @@ void SendFrame::amountValueChange() {
for(QVector<quint64>::iterator it = fees.begin(); it != fees.end(); ++it) {
remote_node_fee += *it;
}
if (remote_node_fee < CurrencyAdapter::instance().getMinimumFee()) {
remote_node_fee = CurrencyAdapter::instance().getMinimumFee();
}
if (remote_node_fee > 10000000000000) {
remote_node_fee = 10000000000000;
if (remote_node_fee < CurrencyAdapter::instance().getMinimumFee()) {
remote_node_fee = CurrencyAdapter::instance().getMinimumFee();
}
if (remote_node_fee > 10000000) {
remote_node_fee = 10000000;
}
}

Expand Down Expand Up @@ -198,6 +196,7 @@ void SendFrame::openUriClicked() {
}

void SendFrame::parsePaymentRequest(QString _request) {
MainWindow::instance().showNormal(); //raise window if minimized
if(_request.startsWith("qwertycoin://", Qt::CaseInsensitive))
{
_request.replace(0, 13, "qwertycoin:");
Expand Down
1 change: 0 additions & 1 deletion src/gui/SendFrame.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2011-2016 The Cryptonote developers
// Copyright (c) 2015-2016 XDN developers
// Copyright (c) 2016 The Karbowanec developers
// Copyright (c) 2018 The Qwertycoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
9 changes: 6 additions & 3 deletions src/gui/ui/sendframe.ui
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,19 @@
</size>
</property>
<property name="maximum">
<number>10</number>
<number>20</number>
</property>
<property name="pageStep">
<property name="minimum">
<number>1</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>1</number>
</property>
<property name="sliderPosition">
<number>5</number>
<number>1</number>
</property>
<property name="tracking">
<bool>false</bool>
Expand Down

0 comments on commit 7b18203

Please sign in to comment.