From 343633f5da277881c95dd705d5e03643e8a1dd74 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Sat, 29 Mar 2014 21:41:01 +0000 Subject: [PATCH 1/2] Removed scrypt.cpp from server library, as it's already present in the common library. --- src/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 26a90cbdd..2dd24cfc4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -108,7 +108,6 @@ libbitcoin_server_a_SOURCES = \ rpcmisc.cpp \ rpcnet.cpp \ rpcrawtransaction.cpp \ - scrypt.cpp \ txdb.cpp \ txmempool.cpp \ $(JSON_H) \ From e4be2ac7e7d83c1f3ca701d3a2bca0361e5aefed Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Sat, 29 Mar 2014 23:54:34 +0000 Subject: [PATCH 2/2] Added new libbitcoin_server_wallet to hold code which depends on the server code, and which in turn is depended upon by the wallet. Renamed bitcoin tests to dogecoin. --- src/Makefile.am | 13 +++++++--- src/Makefile.include | 1 + src/qt/Makefile.am | 2 +- src/qt/test/Makefile.am | 25 +++++++++++-------- src/test/Makefile.am | 22 ++++++++-------- .../{test_bitcoin.cpp => test_dogecoin.cpp} | 0 6 files changed, 37 insertions(+), 26 deletions(-) rename src/test/{test_bitcoin.cpp => test_dogecoin.cpp} (100%) diff --git a/src/Makefile.am b/src/Makefile.am index 2dd24cfc4..995dfebce 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,9 @@ noinst_LIBRARIES = \ libbitcoin_common.a \ libbitcoin_cli.a if ENABLE_WALLET -noinst_LIBRARIES += libbitcoin_wallet.a +noinst_LIBRARIES += \ + libbitcoin_wallet.a \ + libbitcoin_server_wallet.a endif bin_PROGRAMS = @@ -116,12 +118,15 @@ libbitcoin_server_a_SOURCES = \ libbitcoin_wallet_a_SOURCES = \ db.cpp \ crypter.cpp \ - rpcdump.cpp \ - rpcwallet.cpp \ wallet.cpp \ walletdb.cpp \ $(BITCOIN_CORE_H) +libbitcoin_server_wallet_a_SOURCES = \ + rpcdump.cpp \ + rpcwallet.cpp \ + $(BITCOIN_CORE_H) + libbitcoin_common_a_SOURCES = \ allocators.cpp \ chainparams.cpp \ @@ -153,7 +158,7 @@ dogecoind_LDADD = \ $(LIBLEVELDB) \ $(LIBMEMENV) if ENABLE_WALLET -dogecoind_LDADD += libbitcoin_wallet.a +dogecoind_LDADD += libbitcoin_wallet.a libbitcoin_server_wallet.a endif dogecoind_SOURCES = dogecoind.cpp # diff --git a/src/Makefile.include b/src/Makefile.include index 6145b61a4..5723415e3 100644 --- a/src/Makefile.include +++ b/src/Makefile.include @@ -12,6 +12,7 @@ AM_CPPFLAGS = $(INCLUDES) \ AM_CPPFLAGS += $(LEVELDB_CPPFLAGS) AM_LDFLAGS = $(PTHREAD_CFLAGS) +LIBBITCOIN_SERVER_WALLET=$(top_builddir)/src/libbitcoin_server_wallet.a LIBBITCOIN_SERVER=$(top_builddir)/src/libbitcoin_server.a LIBBITCOIN_WALLET=$(top_builddir)/src/libbitcoin_wallet.a LIBBITCOIN_COMMON=$(top_builddir)/src/libbitcoin_common.a diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am index 4503c53e1..ff2978425 100644 --- a/src/qt/Makefile.am +++ b/src/qt/Makefile.am @@ -346,7 +346,7 @@ if TARGET_WINDOWS endif dogecoin_qt_LDADD = libbitcoinqt.a $(LIBBITCOIN_SERVER) if ENABLE_WALLET -dogecoin_qt_LDADD += $(LIBBITCOIN_WALLET) +dogecoin_qt_LDADD += $(LIBBITCOIN_WALLET) $(LIBBITCOIN_SERVER_WALLET) endif dogecoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \ $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) diff --git a/src/qt/test/Makefile.am b/src/qt/test/Makefile.am index 2461b5ff4..f812ee5b5 100644 --- a/src/qt/test/Makefile.am +++ b/src/qt/test/Makefile.am @@ -5,8 +5,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/src \ -I$(top_builddir)/src/qt \ $(PROTOBUF_CFLAGS) \ $(QR_CFLAGS) -bin_PROGRAMS = test_bitcoin-qt -TESTS = test_bitcoin-qt +bin_PROGRAMS = test_dogecoin-qt +TESTS = test_dogecoin-qt TEST_QT_MOC_CPP = moc_uritests.cpp @@ -21,26 +21,31 @@ TEST_QT_H = \ BUILT_SOURCES = $(TEST_QT_MOC_CPP) -test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES) +test_dogecoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES) -test_bitcoin_qt_SOURCES = \ +test_dogecoin_qt_SOURCES = \ test_main.cpp \ uritests.cpp \ $(TEST_QT_H) if ENABLE_WALLET -test_bitcoin_qt_SOURCES += \ +test_dogecoin_qt_SOURCES += \ paymentservertests.cpp endif -nodist_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP) +nodist_test_dogecoin_qt_SOURCES = $(TEST_QT_MOC_CPP) -test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER) +test_dogecoin_qt_LDADD = $(LIBBITCOINQT) if ENABLE_WALLET -test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET) +test_dogecoin_qt_LDADD += $(LIBBITCOIN_WALLET) $(LIBBITCOIN_SERVER_WALLET) endif -test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \ +test_dogecoin_qt_LDADD += $(LIBBITCOIN_SERVER) +if ENABLE_WALLET +test_dogecoin_qt_LDADD += $(LIBBITCOIN_SERVER_WALLET) +endif +test_dogecoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) \ + ${RPCWALLET} $(LIBLEVELDB) \ $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \ $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) -test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS) +test_dogecoin_qt_LDFLAGS = $(QT_LDFLAGS) CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 5a1f42ee6..b38b298a3 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -2,9 +2,9 @@ include $(top_srcdir)/src/Makefile.include AM_CPPFLAGS += -I$(top_srcdir)/src -bin_PROGRAMS = test_bitcoin +bin_PROGRAMS = test_dogecoin -TESTS = test_bitcoin +TESTS = test_dogecoin JSON_TEST_FILES = \ data/script_valid.json \ @@ -21,16 +21,16 @@ RAW_TEST_FILES = data/alertTests.raw BUILT_SOURCES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h) -# test_bitcoin binary # -test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS) -test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \ +# test_dogecoin binary # +test_dogecoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS) +test_dogecoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \ $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) if ENABLE_WALLET -test_bitcoin_LDADD += $(LIBBITCOIN_WALLET) +test_dogecoin_LDADD += $(LIBBITCOIN_WALLET) $(LIBBITCOIN_SERVER_WALLET) endif -test_bitcoin_LDADD += $(BDB_LIBS) +test_dogecoin_LDADD += $(BDB_LIBS) -test_bitcoin_SOURCES = \ +test_dogecoin_SOURCES = \ alert_tests.cpp \ allocator_tests.cpp \ base32_tests.cpp \ @@ -56,7 +56,7 @@ test_bitcoin_SOURCES = \ script_tests.cpp \ serialize_tests.cpp \ sigopcount_tests.cpp \ - test_bitcoin.cpp \ + test_dogecoin.cpp \ transaction_tests.cpp \ uint256_tests.cpp \ util_tests.cpp \ @@ -64,12 +64,12 @@ test_bitcoin_SOURCES = \ $(JSON_TEST_FILES) $(RAW_TEST_FILES) if ENABLE_WALLET -test_bitcoin_SOURCES += \ +test_dogecoin_SOURCES += \ accounting_tests.cpp \ wallet_tests.cpp \ rpc_wallet_tests.cpp endif -nodist_test_bitcoin_SOURCES = $(BUILT_SOURCES) +nodist_test_dogecoin_SOURCES = $(BUILT_SOURCES) CLEANFILES = *.gcda *.gcno $(BUILT_SOURCES) diff --git a/src/test/test_bitcoin.cpp b/src/test/test_dogecoin.cpp similarity index 100% rename from src/test/test_bitcoin.cpp rename to src/test/test_dogecoin.cpp