Skip to content

Commit

Permalink
long overdue unofficial update
Browse files Browse the repository at this point in the history
added checkpoint, support + compiled with open ssl1.0.1j, other code
corrections/known errors
  • Loading branch information
cinnamoncoin committed Oct 25, 2014
1 parent e08d2cb commit 02d0535
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 33 deletions.
22 changes: 18 additions & 4 deletions bitcoin-qt.pro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
TEMPLATE = app
TARGET = sifcoin-qt
macx:TARGET = "Sifcoin-Qt"
VERSION = 0.8.3
VERSION = 0.8.3.1
INCLUDEPATH += src src/json src/qt
QT += network
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN __NO_SYSTEM_INCLUDES
CONFIG += no_include_pwd
CONFIG += thread

Expand All @@ -17,7 +17,21 @@ CONFIG += thread
# Dependency library locations can be customized with:
# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively

LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
LIBS += -lssl -lcrypto
windows:LIBS += -lws2_32 -lole32 -loleaut32 -luuid -lgdi32
BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_55
BOOST_INCLUDE_PATH=C:/deps/boost_1_55_0
BOOST_LIB_PATH=C:/deps/boost_1_55_0/stage/lib
BDB_INCLUDE_PATH=c:/deps/db/build_unix
BDB_LIB_PATH=c:/deps/db/build_unix
OPENSSL_INCLUDE_PATH=c:/deps/openssl-1.0.1j/include
OPENSSL_LIB_PATH=c:/deps/openssl-1.0.1j
MINIUPNPC_LIB_SUFFIX=-miniupnpc
MINIUPNPC_INCLUDE_PATH=C:/deps/deps/miniupnpc
MINIUPNPC_LIB_PATH=C:/deps/deps/miniupnpc
QRENCODE_INCLUDE_PATH=C:/deps/qr
QRENCODE_LIB_PATH=C:/deps/qr/.libs
OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build
Expand Down Expand Up @@ -360,7 +374,7 @@ OTHER_FILES += README.md \
# platform specific defaults, if not overridden on command line
isEmpty(BOOST_LIB_SUFFIX) {
macx:BOOST_LIB_SUFFIX = -mt
win32:BOOST_LIB_SUFFIX = -mgw44-mt-s-1_50
win32:BOOST_LIB_SUFFIX = -mgw46-mt-s-1_55
}

isEmpty(BOOST_THREAD_LIB_SUFFIX) {
Expand Down
10 changes: 2 additions & 8 deletions src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ using namespace boost;
using namespace boost::asio;
using namespace json_spirit;

// Key used by getwork/getblocktemplate miners.
// Allocated in StartRPCThreads, free'd in StopRPCThreads
CReserveKey* pMiningKey = NULL;

static std::string strRPCUserColonPass;

Expand Down Expand Up @@ -727,10 +724,7 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol,

void StartRPCThreads()
{
// getwork/getblocktemplate mining rewards paid here:
pMiningKey = new CReserveKey(pwalletMain);

strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
if ((mapArgs["-rpcpassword"] == "") ||
(mapArgs["-rpcuser"] == mapArgs["-rpcpassword"]))
{
Expand Down Expand Up @@ -849,7 +843,7 @@ void StartRPCThreads()

void StopRPCThreads()
{
delete pMiningKey; pMiningKey = NULL;


if (rpc_io_service == NULL) return;

Expand Down
4 changes: 2 additions & 2 deletions src/bitcoinrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class CRPCTable
};

extern const CRPCTable tableRPC;
extern CReserveKey* pMiningKey;

extern void InitRPCMining();
extern void ShutdownRPCMining();
extern int64 nWalletUnlockTime;
extern int64 AmountFromValue(const json_spirit::Value& value);
extern json_spirit::Value ValueFromAmount(int64 amount);
Expand Down
16 changes: 4 additions & 12 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,9 @@ namespace Checkpoints
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 2000, uint256("0x00000000766adf5ffe2a6838ae6204503ed896ec5125fada28dbc7444e655dd3"))
/* ( 11111, uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"))
( 33333, uint256("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6"))
( 74000, uint256("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20"))
(105000, uint256("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97"))
(134444, uint256("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"))
(168000, uint256("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763"))
(193000, uint256("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))
(210000, uint256("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))
(216116, uint256("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))
(225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
*/ ;
( 140000, uint256("0x000000005ddb00b56a957efdb5f21eabb6d629f3f3e9e7757d966b0dce229ab1"))

;
static const CCheckpointData data = {
&mapCheckpoints,
1372252518, // * UNIX timestamp of last checkpoint block
Expand All @@ -57,7 +49,7 @@ namespace Checkpoints

static MapCheckpoints mapCheckpointsTestnet =
boost::assign::map_list_of
( 546, uint256("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70"))
( 0, uint256("0x0000000c82dce59baed4d2758240ec1d7faeb6b8289086f4826f3690fc7dc6e4"))
;
static const CCheckpointData dataTestnet = {
&mapCheckpointsTestnet,
Expand Down
3 changes: 2 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ void Shutdown()
RenameThread("bitcoin-shutoff");
nTransactionsUpdated++;
StopRPCThreads();
ShutdownRPCMining();
bitdb.Flush(false);
StopNode();
{
Expand Down Expand Up @@ -1080,7 +1081,7 @@ bool AppInit2(boost::thread_group& threadGroup)
printf("mapAddressBook.size() = %"PRIszu"\n", pwalletMain->mapAddressBook.size());

StartNode(threadGroup);

InitRPCMining();
if (fServer)
StartRPCThreads();

Expand Down
8 changes: 4 additions & 4 deletions src/makefile.linux-mingw
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ USE_IPV6:=1
INCLUDEPATHS= \
-I"$(CURDIR)" \
-I"$(CURDIR)"/obj \
-I"$(DEPSDIR)/boost_1_53_0" \
-I"$(DEPSDIR)/boost_1_55_0" \
-I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
-I"$(DEPSDIR)/openssl-1.0.1e/include" \
-I"$(DEPSDIR)/openssl-1.0.1j/include" \
-I"$(DEPSDIR)"

LIBPATHS= \
-L"$(DEPSDIR)/boost_1_53_0/stage/lib" \
-L"$(DEPSDIR)/boost_1_55_0/stage/lib" \
-L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
-L"$(DEPSDIR)/openssl-1.0.1e"
-L"$(DEPSDIR)/openssl-1.0.1j"

LIBS= \
$(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a \
Expand Down
2 changes: 1 addition & 1 deletion src/makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ USE_UPNP:=-
USE_IPV6:=1

DEPSDIR?=/usr/local
BOOST_SUFFIX?=-mgw47-mt-sd-1_53
BOOST_SUFFIX?=-mgw46-mt-sd-1_55

INCLUDEPATHS= \
-I"$(CURDIR)" \
Expand Down
2 changes: 1 addition & 1 deletion src/qt/qrcodedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void QRCodeDialog::genCode()

QString QRCodeDialog::getURI()
{
QString ret = QString("bitcoin:%1").arg(address);
QString ret = QString("Sifcoin%1").arg(address);
int paramCount = 0;

ui->outUri->clear();
Expand Down
12 changes: 12 additions & 0 deletions src/rpcmining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@

using namespace json_spirit;
using namespace std;
static CReserveKey* pMiningKey = NULL;

void InitRPCMining()
{

pMiningKey = new CReserveKey(pwalletMain);
}

void ShutdownRPCMining()
{
delete pMiningKey; pMiningKey = NULL;
}

Value getgenerate(const Array& params, bool fHelp)
{
Expand Down

0 comments on commit 02d0535

Please sign in to comment.