Skip to content

Commit

Permalink
Merge pull request #67 from IamLupo/master
Browse files Browse the repository at this point in the history
Version 2.0.0.2
  • Loading branch information
IamLupo committed Jul 28, 2021
2 parents 0bdf157 + 88f125e commit e34ff8e
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 32 deletions.
10 changes: 4 additions & 6 deletions DigitalNote.app.pro
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
include(include/definitions.pri)

TARGET = DigitalNote-qt
DIGITALNOTE_APP_NAME = app
DIGITALNOTE_PATH = $$PWD

## Custom Configurations
include(DigitalNote_config.pri)

## Base
include(include/base.pri)

TARGET = DigitalNote-qt

DEFINES += ENABLE_WALLET

include(include/build_path.pri)
include(include/compiler_settings.pri)
include(include/security.pri)
include(include/qt.pri)
include(include/release.pri)
include(include/msse2.pri)

## App settings
include(include/app/qt_settings.pri)
include(include/app/forums.pri)
include(include/app/headers.pri)
Expand All @@ -33,7 +32,6 @@ include(include/options/use_build_info.pri)
include(include/options/use_dbus.pri)
include(include/options/use_pch.pri)
include(include/options/use_unity_build.pri)
include(include/options/use_force_std.pri)

## Libraries
include(include/libs.pri)
Expand Down
10 changes: 4 additions & 6 deletions DigitalNote.daemon.pro
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
include(include/definitions.pri)

TARGET = DigitalNoted
DIGITALNOTE_APP_NAME = daemon
DIGITALNOTE_PATH = $$PWD

## Custom Configurations
include(DigitalNote_config.pri)

## Base
include(include/base.pri)

TARGET = DigitalNoted

DEFINES += ENABLE_WALLET

include(include/build_path.pri)
include(include/compiler_settings.pri)
include(include/security.pri)
include(include/qt.pri)
include(include/release.pri)
include(include/msse2.pri)

## Deamon settings
include(include/daemon/qt_settings.pri)
include(include/daemon/headers.pri)
include(include/daemon/sources.pri)
Expand All @@ -28,7 +27,6 @@ include(include/options/use_0.pri)
include(include/options/use_build_info.pri)
include(include/options/use_pch.pri)
include(include/options/use_unity_build.pri)
include(include/options/use_force_std.pri)

## Libraries
include(include/libs.pri)
Expand Down
2 changes: 1 addition & 1 deletion DigitalNote_config.pri
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DIGITALNOTE_VERSION_MAJOR = 2
DIGITALNOTE_VERSION_MINOR = 0
DIGITALNOTE_VERSION_REVISION = 0
DIGITALNOTE_VERSION_BUILD = 1
DIGITALNOTE_VERSION_BUILD = 2

DIGITALNOTE_LIB_LEVELDB_DIR = $${DIGITALNOTE_PATH}/src/leveldb
DIGITALNOTE_LIB_LEVELDB_NEW_DIR = $${DIGITALNOTE_PATH}/src/leveldb-2.11
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ cd DigitalNote

With UPNP:
```
qmake -qt=qt5 DigitalNote.daemon.pro USE_FORCE_STD_17=1
qmake -qt=qt5 DigitalNote.daemon.pro USE_UPNP=1
make -j 4
sudo cp -r DigitalNoted /usr/local/bin/DigitalNoted
```

**Recommended Without** UPNP:
```
qmake -qt=qt5 DigitalNote.daemon.pro USE_FORCE_STD_17=1 USE_UPNP=-
qmake -qt=qt5 DigitalNote.daemon.pro
make -j 4
sudo cp -r DigitalNoted /usr/local/bin/DigitalNoted
```
Expand All @@ -160,13 +160,13 @@ export BDB_LIB_PATH="/usr/local/BerkeleyDB.6.2/lib"

With UPNP:
```
qmake -qt=qt5 DigitalNote.app.pro USE_FORCE_STD_17=1 USE_UPNP=- USE_DBUS=1 USE_QRCODE=1
qmake -qt=qt5 DigitalNote.app.pro USE_UPNP=1 USE_DBUS=1 USE_QRCODE=1
make -j 4
```

**Recommended Without** UPNP:
```
qmake -qt=qt5 DigitalNote.app.pro USE_FORCE_STD_17=1 USE_UPNP=- USE_DBUS=1 USE_QRCODE=1
qmake -qt=qt5 DigitalNote.app.pro USE_DBUS=1 USE_QRCODE=1
make -j 4
```

Expand Down
4 changes: 3 additions & 1 deletion include/base.pri
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ macx {
DEFINES += MSG_NOSIGNAL=0

ICON = src/qt/res/icons/digitalnote.icns
}
}

DEFINES += ENABLE_WALLET
2 changes: 2 additions & 0 deletions include/compiler_settings.pri
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ CONFIG += c++17

QMAKE_CXXFLAGS =

include(fix_std_cxx_17.pri)

QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option
QMAKE_CXXFLAGS_WARN_ON += -fpermissive
#QMAKE_CXXFLAGS_WARN_ON += -Wall
Expand Down
11 changes: 9 additions & 2 deletions include/options/use_force_std.pri → include/fix_std_cxx_17.pri
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
##
## Reference: https://stackoverflow.com/questions/46610996/cant-use-c17-features-using-g-7-2-in-qtcreator

contains(USE_FORCE_STD_17, 1) {

lessThan(QT_MAJOR_VERSION, 5)
{
QMAKE_CXXFLAGS += -std=c++17
}

isEqual(QT_MINOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 12)
{
QMAKE_CXXFLAGS += -std=c++17
}
}
8 changes: 5 additions & 3 deletions include/libs/miniupnpc.pri
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# or: qmake "USE_UPNP=-" (not supported)
# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support

contains(USE_UPNP, -) {
message(Building without UPNP support)
} else {
contains(USE_UPNP, 1) {
message(Building UPNP support)
win32 {
exists($${DIGITALNOTE_LIB_MINIUPNP_DIR}/libminiupnpc.a) {
message("found MiniUPNP lib")
Expand Down Expand Up @@ -36,4 +36,6 @@ contains(USE_UPNP, -) {

DEFINES += MINIUPNP_STATICLIB
DEFINES += USE_UPNP
} else {
message(Building without UPNP support)
}
2 changes: 1 addition & 1 deletion src/cblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew)
}

// Connect further blocks
for(CBlockIndex *pindex : backwards(vpindexSecondary))
for(CBlockIndex *pindex : backwards<std::vector<CBlockIndex*>>(vpindexSecondary))
{
CBlock block;
if (!block.ReadFromDisk(pindex))
Expand Down
2 changes: 1 addition & 1 deletion src/checkpoints.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace Checkpoints
{
MapCheckpoints& checkpoints = (TestNet() ? mapCheckpointsTestnet : mapCheckpoints);

for(const MapCheckpoints::value_type& i : backwards(checkpoints))
for(const MapCheckpoints::value_type& i : backwards<MapCheckpoints>(checkpoints))
{
const uint256& hash = i.second;
std::map<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash);
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 1
#define CLIENT_VERSION_BUILD 2

// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
4 changes: 2 additions & 2 deletions src/cmasternodepayments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)

std::vector<CTxIn> vecLastPayments;

for(CMasternodePaymentWinner& winner : backwards(vWinning))
for(CMasternodePaymentWinner& winner : backwards<std::vector<CMasternodePaymentWinner>>(vWinning))
{
//if we already have the same vin - we have one full payment cycle, break
if(vecLastPayments.size() > (unsigned int)nMinimumAge)
Expand Down Expand Up @@ -301,7 +301,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
{
LogPrintf(" Find by reverse \n");

for(CTxIn& vinLP : backwards(vecLastPayments))
for(CTxIn& vinLP : backwards<std::vector<CTxIn>>(vecLastPayments))
{
CMasternode* pmn = mnodeman.Find(vinLP);
if(pmn != NULL)
Expand Down
4 changes: 2 additions & 2 deletions src/fork.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ static const int64_t VELOCITY_TDIFF = 0; // Use Velocity's retargetting method.
Update 1.0.0:
- Add first developer address
*/
#define VERION_1_0_0_0_MANDATORY_UPDATE_START 1558310400 // Monday, 20 May 2019 00:00:00 GMT
#define VERION_1_0_0_0_MANDATORY_UPDATE_END 1558310400 // Monday, 20 May 2019 00:00:00 GMT
#define VERION_1_0_0_0_MANDATORY_UPDATE_START 1558310750 // Monday, 20 May 2019 00:00:00 GMT
#define VERION_1_0_0_0_MANDATORY_UPDATE_END 1558310750 // Monday, 20 May 2019 00:00:00 GMT
#define VERION_1_0_0_0_DEVELOPER_ADDRESS "dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"

/*
Expand Down
2 changes: 1 addition & 1 deletion src/instantx.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ int64_t CreateNewLock(CTransaction tx)
{
int64_t nTxAge = 0;

for(CTxIn i : backwards(tx.vin))
for(CTxIn i : backwards<std::vector<CTxIn>>(tx.vin))
{
nTxAge = GetInputAge(i);

Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ bool Reorganize(CTxDB& txdb, CBlockIndex* pindexNew)
// Queue memory transactions to resurrect.
// We only do this for blocks after the last checkpoint (reorganisation before that
// point should only happen with -reindex/-loadblock, or a misbehaving peer.
for(const CTransaction& tx : backwards(block.vtx))
for(const CTransaction& tx : backwards<std::vector<CTransaction>>(block.vtx))
{
if (!(tx.IsCoinBase() || tx.IsCoinStake()) && pindex->nHeight > Checkpoints::GetTotalBlocksEstimate())
{
Expand Down

0 comments on commit e34ff8e

Please sign in to comment.