Skip to content

Commit

Permalink
Merge pull request #6 from fsb4000/master
Browse files Browse the repository at this point in the history
new alert key, change max stake age, LevelDB, change tor nodes
  • Loading branch information
AsiaCoin committed Aug 5, 2015
2 parents 2409e37 + c895777 commit 0254e1e
Show file tree
Hide file tree
Showing 238 changed files with 29,702 additions and 525 deletions.
44 changes: 32 additions & 12 deletions asiacoin-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ CONFIG += static
# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively

win32 {
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_57
BOOST_INCLUDE_PATH=C:/deps/boost_1_57_0
BOOST_LIB_PATH=C:/deps/boost_1_57_0/stage/lib
BDB_INCLUDE_PATH=C:/deps/db-4.8.30.NC/build_unix
BDB_LIB_PATH=C:/deps/db-4.8.30.NC/build_unix
OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.2/include
OPENSSL_LIB_PATH=C:/deps/openssl-1.0.2
MINIUPNPC_INCLUDE_PATH=C:/deps/
MINIUPNPC_LIB_PATH=C:/deps/miniupnpc
QRENCODE_INCLUDE_PATH=C:/deps/qrencode-3.4.4
QRENCODE_LIB_PATH=C:/deps/qrencode-3.4.4/.libs
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_58
BOOST_INCLUDE_PATH=C:/MyProjects/Deps/boost_1_58_0
BOOST_LIB_PATH=C:/MyProjects/Deps/boost_1_58_0/stage/lib
BDB_INCLUDE_PATH=C:/MyProjects/Deps/db-4.8.30.NC/build_unix
BDB_LIB_PATH=C:/MyProjects/Deps/db-4.8.30.NC/build_unix
OPENSSL_INCLUDE_PATH=C:/MyProjects/Deps/openssl-1.0.2d/include
OPENSSL_LIB_PATH=C:/MyProjects/Deps/openssl-1.0.2d
MINIUPNPC_INCLUDE_PATH=C:/MyProjects/Deps
MINIUPNPC_LIB_PATH=C:/MyProjects/Deps/miniupnpc
QRENCODE_INCLUDE_PATH=C:/MyProjects/Deps/qrencode-3.4.4
QRENCODE_LIB_PATH=C:/MyProjects/Deps/qrencode-3.4.4/.libs
}

OBJECTS_DIR = build
Expand Down Expand Up @@ -105,6 +105,25 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
}

INCLUDEPATH += src/leveldb/include src/leveldb/helpers
LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
SOURCES += src/txdb-leveldb.cpp
!windows {
genleveldb.commands = cd $$PWD/src/leveldb ; make libleveldb.a libmemenv.a
} else {
# make an educated guess about what the ranlib command is called
isEmpty(QMAKE_RANLIB) {
QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
}
# genleveldb.commands = cd $$PWD/src/leveldb ; CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$$BOOST_INCLUDE_PATH" LDFLAGS="-L$$BOOST_LIB_PATH" make libleveldb.a libmemenv.a ; $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a
}
genleveldb.target = $$PWD/src/leveldb/libleveldb.a
genleveldb.depends = FORCE
PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
QMAKE_EXTRA_TARGETS += genleveldb
# Gross ugly hack that depends on qmake internals, unfortunately there's no other way to do it.
QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; make clean


# regenerate src/build.h
!windows|contains(USE_BUILD_INFO, 1) {
Expand Down Expand Up @@ -154,6 +173,7 @@ HEADERS += src/qt/bitcoingui.h \
src/net.h \
src/key.h \
src/db.h \
src/txdb.h \
src/walletdb.h \
src/script.h \
src/init.h \
Expand Down Expand Up @@ -375,7 +395,7 @@ windows:!contains(MINGW_THREAD_BUGFIX, 0) {
# it is prepended to QMAKE_LIBS_QT_ENTRY.
# It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes
# any problems on some untested qmake profile now or in the future.
DEFINES += _MT
DEFINES += _MT BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
}

Expand Down
2 changes: 1 addition & 1 deletion src/alert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using namespace std;
map<uint256, CAlert> mapAlerts;
CCriticalSection cs_mapAlerts;

static const char* pszMainKey = "04629f7808ddb28faefe3787f8e9ba5a34b189d1b7d625339980430d6f6d7dc55009e93db10a6c84b1b4602a26d1a090584ac7350ef716a67a68a50271ac9146ae";
static const char* pszMainKey = "041883f0ef683f8ab4507f2f0c938ddfa6dc6fe6e5db32ed229b69b7c486b4e9ae2e0f75cc26d57a3fb1a43b5582a2fd225337a54a6018ca37aafd6ac6ac0508cb";

// TestNet alerts pubKey
static const char* pszTestKey = "0471dc165db490094d35cde15b1f5d755fa6ad6f2b5ed0f340e3f17f57389c3c2af113a8cbcc885bde73305a553b5640c83021128008ddf882e856336269080496";
Expand Down
2 changes: 1 addition & 1 deletion src/bignum.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class CBigNum : public BIGNUM
BN_mpi2bn(pch, p - pch, this);
}

uint256 getuint256()
uint256 getuint256() const
{
unsigned int nSize = BN_bn2mpi(this, NULL);
if (nSize < 4)
Expand Down
7 changes: 2 additions & 5 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "checkpoints.h"

#include "db.h"
#include "txdb.h"
#include "main.h"
#include "uint256.h"

Expand All @@ -28,6 +28,7 @@ namespace Checkpoints
( 10000,uint256("0x0000000000b780717105a4a6fbfc31c4439e8ff7cffaafacfcf92aac5198ebdb"))
( 26722,uint256("0xc7234cbc7e1ea9e8edaec094055a55b9b3d76a4c209424d697e4b1578e732346"))
( 536310,uint256("0x339a9a3edefed2570629cb8e634101776c9c42fca7cb6b19c9001f715c679f12"))
( 671420,uint256("0x647f649a590ebef190de65b7275326164dfbf00242448c94a40419942fe7c6a5"))
;

static MapCheckpoints mapCheckpointsTestnet =
Expand Down Expand Up @@ -138,7 +139,6 @@ namespace Checkpoints
}
if (!txdb.TxnCommit())
return error("WriteSyncCheckpoint(): failed to commit to db sync checkpoint %s", hashCheckpoint.ToString().c_str());
txdb.Close();

Checkpoints::hashSyncCheckpoint = hashCheckpoint;
return true;
Expand Down Expand Up @@ -169,7 +169,6 @@ namespace Checkpoints
return error("AcceptPendingSyncCheckpoint: SetBestChain failed for sync checkpoint %s", hashPendingCheckpoint.ToString().c_str());
}
}
txdb.Close();

if (!WriteSyncCheckpoint(hashPendingCheckpoint))
return error("AcceptPendingSyncCheckpoint(): failed to write sync checkpoint %s", hashPendingCheckpoint.ToString().c_str());
Expand Down Expand Up @@ -260,7 +259,6 @@ namespace Checkpoints
{
return error("ResetSyncCheckpoint: SetBestChain failed for hardened checkpoint %s", hash.ToString().c_str());
}
txdb.Close();
}
else if(!mapBlockIndex.count(hash))
{
Expand Down Expand Up @@ -417,7 +415,6 @@ bool CSyncCheckpoint::ProcessSyncCheckpoint(CNode* pfrom)
return error("ProcessSyncCheckpoint: SetBestChain failed for sync checkpoint %s", hashCheckpoint.ToString().c_str());
}
}
txdb.Close();

if (!Checkpoints::WriteSyncCheckpoint(hashCheckpoint))
return error("ProcessSyncCheckpoint(): failed to write sync checkpoint %s", hashCheckpoint.ToString().c_str());
Expand Down
4 changes: 2 additions & 2 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 1
#define CLIENT_VERSION_REVISION 3
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 0

// Converts the parameter X to a string after macro replacement on X has been performed.
Expand Down
Loading

0 comments on commit 0254e1e

Please sign in to comment.