Skip to content

Commit ff2eccb

Browse files
Merge pull request #3 from ApollonMax/master
1.0.6
2 parents f05e1e0 + dc81193 commit ff2eccb

File tree

11 files changed

+56
-52
lines changed

11 files changed

+56
-52
lines changed

Apollon.pro

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ greaterThan(QT_MAJOR_VERSION, 4) {
1515
QT += widgets
1616
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
1717
}
18-
18+
macx {
19+
BOOST_INCLUDE_PATH=/usr/local/Cellar/boost@1.60/1.60.0/include
20+
BOOST_LIB_PATH=/usr/local/Cellar/boost@1.60/1.60.0/lib
21+
BDB_INCLUDE_PATH=/usr/local/Cellar/berkeley-db@4/4.8.30/include
22+
BDB_LIB_PATH=/usr/local/Cellar/berkeley-db@4/4.8.30/lib
23+
OPENSSL_INCLUDE_PATH=/usr/local/Cellar/openssl/1.0.2o_1/include
24+
OPENSSL_LIB_PATH=/usr/local/Cellar/openssl/1.0.2o_1/lib
25+
MINIUPNPC_INCLUDE_PATH=/usr/local/Cellar/miniupnpc/2.1/include
26+
MINIUPNPC_LIB_PATH=/usr/local/Cellar/miniupnpc/2.1/lib
27+
}
1928
# for boost 1.37, add -mt to the boost libraries
2029
# use: qmake BOOST_LIB_SUFFIX=-mt
2130
# for boost thread win32 with _win32 sufix
@@ -511,12 +520,12 @@ isEmpty(BDB_INCLUDE_PATH) {
511520
}
512521

513522
isEmpty(BOOST_LIB_PATH) {
514-
macx:BOOST_LIB_PATH = /usr/local/Cellar/boost@1.59/1.59.0/lib
523+
macx:BOOST_LIB_PATH = /usr/local/Cellar/boost@1.60/1.60.0/lib
515524
windows:BOOST_LIB_PATH=C:/dev/coindeps32/boost_1_57_0/lib
516525
}
517526

518527
isEmpty(BOOST_INCLUDE_PATH) {
519-
macx:BOOST_INCLUDE_PATH = /usr/local/Cellar/boost@1.59/1.59.0/include
528+
macx:BOOST_INCLUDE_PATH = /usr/local/Cellar/boost@1.60/1.60.0/include
520529
windows:BOOST_INCLUDE_PATH=C:/dev/coindeps32/boost_1_57_0/include
521530
}
522531

@@ -599,7 +608,7 @@ INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$
599608
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
600609
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
601610
# -lgdi32 has to happen after -lcrypto (see #681)
602-
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
611+
windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 -pthread
603612
!windows: {
604613
LIBS += -lgmp
605614
} else {

INSTALL

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@ implementation of Apollon.
1010

1111
If everything is setup properly, execute:
1212

13-
qmake "USE_UPNP=-" Apollon.pro
13+
## Mac Builds:
14+
---------
15+
# prepare makefile
16+
qmake "USE_UPNP=-"
1417

15-
and then
18+
# Check if the files are executable and if not set them as followed:
19+
chmod 777 share/genbuild.sh
20+
chmod 777 src/leveldb/build_detect_platform
1621

17-
make -j 2 -f Makefile
22+
# run build
23+
make -j6
24+
25+
# finally call
26+
macdeployqt Apollon-Qt.app

doc/build-osx.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ brew install llvm --with-toolchain --with-clang
4040

4141
brew install libtool leveldb db48 openssl miniupnpc
4242

43-
brew install homebrew/core/boost159
44-
brew link boost@1.59 --force
43+
brew install homebrew/core/boost160
44+
brew link boost@1.60 --force
4545

4646
brew install berkeley-db4
4747
brew link berkeley-db4 --force

mac_copy-content.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

share/genbuild.sh

100644100755
File mode changed.

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
99
#define CLIENT_VERSION_MAJOR 1
1010
#define CLIENT_VERSION_MINOR 0
11-
#define CLIENT_VERSION_REVISION 5
11+
#define CLIENT_VERSION_REVISION 6
1212
#define CLIENT_VERSION_BUILD 0
1313

1414
// Set to true for release, false for prerelease or test build

src/main.cpp

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,10 @@ int64_t GetProofOfWorkReward(int nHeight, int64_t nFees)
14011401
// miner's coin stake reward
14021402
int64_t GetProofOfStakeReward(const CBlockIndex* pindexPrev, int64_t nCoinAge, int64_t nFees)
14031403
{
1404+
if (nBestHeight > FORK_OFF) {
1405+
return COIN;
1406+
}
1407+
14041408
int64_t nSubsidy = 0;
14051409

14061410
if(nBestHeight >= 500 && nBestHeight <= 25000){
@@ -1452,9 +1456,7 @@ static int64_t nTargetTimespanV2 = 96 * 60; // 96 mins
14521456
unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfStake)
14531457
{
14541458
unsigned int nTargetTemp = TARGET_SPACING;
1455-
if (pindexLast->nHeight > 160000)
1456-
nTargetTemp = TARGET_SPACING3;
1457-
else if (pindexLast->nTime > FORK_TIME)
1459+
if (pindexLast->nTime > FORK_TIME)
14581460
nTargetTemp = TARGET_SPACING2;
14591461

14601462
if(pindexLast->GetBlockTime() > STAKE_TIMESPAN_SWITCH_TIME)
@@ -1482,7 +1484,7 @@ unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfS
14821484
CBigNum bnNew;
14831485
bnNew.SetCompact(pindexPrev->nBits);
14841486

1485-
if (nHeight < TARGET_DIFF_UPDATE_START)
1487+
if (nHeight < TARGET_DIFF_UPDATE_START || nHeight >= FORK_OFF) // back to normal
14861488
{
14871489
if (nActualSpacing < 0)
14881490
{
@@ -1491,27 +1493,15 @@ unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfS
14911493
int64_t nInterval = nTargetTimespan / nTargetTemp;
14921494
bnNew *= ((nInterval - 1) * nTargetTemp + nActualSpacing + nActualSpacing);
14931495
bnNew /= ((nInterval + 1) * nTargetTemp);
1494-
}
1495-
else
1496-
{
1497-
// In this version, it is OK if nActualSpacing is negative
1498-
// We'll still put some reasonable bounds on it just in case
1499-
1500-
// Normally, nTargetspanV2 should be much greater than either nActualSpacing or TARGET_SPACING
1501-
// The new change looks to correct an exploit where a timestamp is falsified by the submitter
1502-
// This can cause a temporary jump in nActualSpacing and similar drop on the next block with the correct timestamp
1503-
// For example, if nActualSpacing is typically 60, and goes to 660 (600 added on):
1504-
// First time, bnNew is adjusted by (660 - 60 + 2400) / (60 - 660 + 2400) = 3000 / 1800
1505-
// Next time, nActualSpacing is now -540 (120 - 660), bnNew is adjusted by (-540 - 60 + 2400) / (60 + 540 + 2400) = 1800 / 3000
1506-
// The net product is 1 -- effectively canceling each other out.
1507-
if ((nActualSpacing - TARGET_SPACING + nTargetTimespanV2 >= 30) && (TARGET_SPACING - nActualSpacing + nTargetTimespanV2 >= 30))
1508-
{
1509-
bnNew *= (nActualSpacing - TARGET_SPACING + nTargetTimespanV2);
1510-
bnNew /= (TARGET_SPACING - nActualSpacing + nTargetTimespanV2);
1511-
}
1512-
else
1513-
{
1514-
// out of bounds. Do not change difficulty
1496+
} else {
1497+
if (nHeight < FORK_OFF) {
1498+
if ((nActualSpacing - TARGET_SPACING + nTargetTimespanV2 >= 30) && (TARGET_SPACING - nActualSpacing + nTargetTimespanV2 >= 30))
1499+
{
1500+
bnNew *= (nActualSpacing - TARGET_SPACING + nTargetTimespanV2);
1501+
bnNew /= (TARGET_SPACING - nActualSpacing + nTargetTimespanV2);
1502+
}
1503+
else{
1504+
}
15151505
}
15161506
}
15171507

@@ -3781,7 +3771,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
37813771
CAddress addrFrom;
37823772
uint64_t nNonce = 1;
37833773
vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe;
3784-
if (nBestHeight >= 70000 && pfrom->nVersion < MIN_PEER_PROTO_VERSION || (nBestHeight >= HARD_FORK_BLOCKRDB && pfrom->nVersion < MIN_PEER_PROTO_VERSION_FORKRDB))
3774+
if (nBestHeight >= 70000 && pfrom->nVersion < MIN_PEER_PROTO_VERSION || (nBestHeight >= HARD_FORK_BLOCKRDB && pfrom->nVersion < MIN_PEER_PROTO_VERSION) || (nBestHeight >= FORK_OFF && pfrom->nVersion < MIN_PEER_PROTO_VERSION_FORKRDB))
37853775
{
37863776
// disconnect from peers older than this proto version
37873777
LogPrintf("partner %s using obsolete version %i; disconnecting\n", pfrom->addr.ToString(), pfrom->nVersion);

src/main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ static const int64_t STAKE_TIMESPAN_SWITCH_TIME = 1517720873;
3131
static const int64_t STAKE_TIMESPAN_SWITCH_TIME1 = 1518720873; //February 15th, 2018
3232
static const int64_t FORK_TIME = 1518720873; //February 15th, 2018
3333

34-
3534
#define INSTANTX_SIGNATURES_REQUIRED 10
3635
#define INSTANTX_SIGNATURES_TOTAL 15
3736

src/makefile.osx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
1010
C=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
1111
DEPSDIR=/usr/local
12-
BOOST_VERSION=1.59.0
12+
BOOST_VERSION=1.60.0
1313
BERKLEY_VERSION=4.8.30
1414
OPENSSL_VERSION=1.0.2o_1
1515

1616
INCLUDEPATHS= \
1717
-I"$(CURDIR)" \
1818
-I"$(CURDIR)"/obj \
1919
-I"$(DEPSDIR)/include" \
20-
-I"$(DEPSDIR)/Cellar/boost@1.59/$(BOOST_VERSION)/include" \
20+
-I"$(DEPSDIR)/Cellar/boost@1.60/$(BOOST_VERSION)/include" \
2121
-I"$(DEPSDIR)/Cellar/berkeley-db@4/$(BERKLEY_VERSION)/include" \
2222
-I"$(DEPSDIR)/Cellar/openssl/$(OPENSSL_VERSION)/include"
2323

2424
LIBPATHS= \
2525
-L"$(DEPSDIR)/lib" \
26-
-L"$(DEPSDIR)/Cellar/boost@1.59/$(BOOST_VERSION)/lib" \
26+
-L"$(DEPSDIR)/Cellar/boost@1.60/$(BOOST_VERSION)/lib" \
2727
-L"$(DEPSDIR)/Cellar/berkeley-db@4/$(BERKLEY_VERSION)/lib" \
2828
-L"$(DEPSDIR)/Cellar/openssl/$(OPENSSL_VERSION)/lib"
2929

src/version.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const std::string CLIENT_NAME("Apollon");
3131
// git will put "#define GIT_ARCHIVE 1" on the next line inside archives.
3232
#define GIT_ARCHIVE 1
3333
#ifdef GIT_ARCHIVE
34-
# define GIT_COMMIT_ID "60031"
34+
# define GIT_COMMIT_ID "60032"
3535
#endif
3636

3737
#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \

0 commit comments

Comments
 (0)