summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-10-22 16:45:04 +0000
committerAnthony G. Basile <blueness@gentoo.org>2013-10-22 16:45:04 +0000
commit523ad4e4036c86d727b17ee3c928429b60f0d9f1 (patch)
treef0ea16355b2f2607e45b0d6e522b2d33152506c5 /net-p2p
parentDrop stable keywords on unstable-only arches (diff)
downloadhistorical-523ad4e4036c86d727b17ee3c928429b60f0d9f1.tar.gz
historical-523ad4e4036c86d727b17ee3c928429b60f0d9f1.tar.bz2
historical-523ad4e4036c86d727b17ee3c928429b60f0d9f1.zip
Remove older patches
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/bitcoind/ChangeLog9
-rw-r--r--net-p2p/bitcoind/Manifest28
-rw-r--r--net-p2p/bitcoind/files/0.4.2-Makefile.gentoo85
-rw-r--r--net-p2p/bitcoind/files/0.4.4+bip16-eligius_sendfee.patch178
-rw-r--r--net-p2p/bitcoind/files/0.4.7-reopen_log_file.patch94
-rw-r--r--net-p2p/bitcoind/files/0.5.0.5+bip16-eligius_sendfee.patch169
-rw-r--r--net-p2p/bitcoind/files/0.6.0.8-reopen_log_file.patch94
-rw-r--r--net-p2p/bitcoind/files/0.8.0-sys_leveldb.patch195
8 files changed, 29 insertions, 823 deletions
diff --git a/net-p2p/bitcoind/ChangeLog b/net-p2p/bitcoind/ChangeLog
index 6f4156e0d2b4..add27a688c86 100644
--- a/net-p2p/bitcoind/ChangeLog
+++ b/net-p2p/bitcoind/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-p2p/bitcoind
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/ChangeLog,v 1.80 2013/10/10 05:19:24 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/ChangeLog,v 1.81 2013/10/22 16:44:53 blueness Exp $
+
+ 22 Oct 2013; Anthony G. Basile <blueness@gentoo.org>
+ -files/0.4.2-Makefile.gentoo, -files/0.4.4+bip16-eligius_sendfee.patch,
+ -files/0.4.7-reopen_log_file.patch,
+ -files/0.5.0.5+bip16-eligius_sendfee.patch,
+ -files/0.6.0.8-reopen_log_file.patch, -files/0.8.0-sys_leveldb.patch:
+ Remove older patches
10 Oct 2013; Patrick Lauer <patrick@gentoo.org> metadata.xml:
Remove unneeded useflag descriptions from metadata.xml
diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest
index 4bde82974c69..10c78a651030 100644
--- a/net-p2p/bitcoind/Manifest
+++ b/net-p2p/bitcoind/Manifest
@@ -1,9 +1,6 @@
-AUX 0.4.2-Makefile.gentoo 1845 SHA256 7ab3bf195862802f527c2016b126f7fba7d63a8b3e2048634011cdfa761cb750 SHA512 dd7a338890747f8911f635b5bbed569d2033311bb25922690a74269a9e820172ff0e42b2f4b3a6d78ac1c243f0377641aec50af1441914f57bb42fc8ae05566b WHIRLPOOL e2273b0f50d018a23b6908728242d904a737bb665c3dc33c94afc7b5ee55336e105a2e9eaaf9b997961cdfe56c19f7dddd9603dc4acafedcaca6c92b23e82c8d
-AUX 0.4.4+bip16-eligius_sendfee.patch 7210 SHA256 5b7db8d1f55e2b9db5b6fca65b252f0eefefd3f248b57a0f8c927a0262f2e6eb SHA512 af1d6110422a91c70d03b7289bfb177ffe38415997177c76c6f4147395f04c89624c778febd5f383eaa722af506420dda6bc4a4dcf7148b7d2297bf055c86871 WHIRLPOOL 1feb32db0529b1a689e0120b8037fda37700eb941541edd5387dffd6628e198399a5b1105b7057ba0615de43bc66e1d8a3f92bdde8ec3b103be03009842fa669
-AUX 0.4.7-reopen_log_file.patch 2652 SHA256 43fa0e4d6bc3abf5cf744fade98ff0269944c8903e766124f75f06fdb04936cd SHA512 e4cb02b4f7b2997ae151a583f16e750d738727f4626176901f82bca96f96a08a8739c0353df3b794f73da383d7345042ddad34379d18a3ccde8fabb55a38e122 WHIRLPOOL f597c11c96ab9c48c61e73e390f4de8faf34268485e2914cb833ddbbe629c415e5b514dce4725ead595990995aec7898dd931742a708f80c7f52807e43168f5a
-AUX 0.5.0.5+bip16-eligius_sendfee.patch 6739 SHA256 2e16bca9106bcb8056efc5a60791226119ca011cd007e4b547de4c23f0d8e9a4 SHA512 213b12973557993cbe7fe4a8dcaccec0bb732dc3f45f242d4e42de576af75e1f76d3d1aa4501bf4f63e304773505ca768c1a5eb7f914b87bbb34f81b5ece1b87 WHIRLPOOL 6f285997fac74ca70ede3baeb708f6d7ba3872fb390cddb56da9225955a4e78c3eb466fc3792a12c527d6f4b1e0d3637f2d67553b28c51b32a1f61cf92b01a06
-AUX 0.6.0.8-reopen_log_file.patch 2671 SHA256 c8fb07548fa9e096c92e322f5d5201f20cd9f32ed52fdda395e243a18fca79e3 SHA512 e77fe546283d8c7f699c3091d77af7f622486a14e7e72045f1675ab86e2c9156d812ffded9a8e47b63f4bd053ab976c7063986dd2611c60f4585ca827c352e1a WHIRLPOOL 36c95d8ae28cebd5eef01b20e60fd04ab4596a2c2dbeff3d0add15524c1ee11cc67fd15f4f7e1136454b51f14d75f3a9620063a3b9809f1492a62d9d6e03a88d
-AUX 0.8.0-sys_leveldb.patch 6739 SHA256 7a9548955cf923badfd0eebf5c86531de55f15b93c97da609eb2a3cbf191bcc7 SHA512 c15c36165deff50762ae6d710c7e7b341b78ee395be4ec976e8e3a2d4aa3902f78226e03d85d43033299e1ae6a4ec48cdc4e912a90c065125c1a2a07933109a5 WHIRLPOOL 5f86b372bb7226626fd4eee5bfe2519ae84db8851a591e6ee204b508203c0723b7327ae5c1e8a68c8e961471f95939ef212a301678760531508d15c5aecaf29e
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX 0.8.2-sys_leveldb.patch 6726 SHA256 11322fc7715b9b552075babf60c8261e0343e5ec834188013fb7d77cacf3b4d9 SHA512 e371b6da685c916c5941cfc094d01237f18502597e778b35e1c31cbf93cda1118a97272b56605f7c6da1f2873190415974ebdb4e7ce08a5d04e94dac675a4112 WHIRLPOOL 8579c73d18281b3910c260ef0708842380f8c5001982c94ea51e6b8f99111b11959ffb04fc7812e0c90ba8a919071b13e975ed95ec207017e34bef5844f65068
AUX bitcoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123
AUX bitcoin.confd 238 SHA256 72300b41d57325de5a5f2ddea449d5f414f278549fb665d60746707ee5de2549 SHA512 2b010d8c773a76868a11626ba0552f122cd51293cb39e06b7ed7e17be47f9e3790cc090f8311b32d441d3ff1eb4db266a4b2cd08693f7edbe2dde178254838d1 WHIRLPOOL f51d97b828b4b096d1ca924cb7256f648b94ae098a4f10dcfbac7d6045cf84da0c203b1e2d5569f3b304ba193501c9b9239c5ee1a1c11fbdb62bb9909c384358
@@ -12,5 +9,22 @@ AUX bitcoind.logrotate 110 SHA256 9b469c67e7af914199d699ac76279f194010f154be91f8
AUX bitcoind.service 869 SHA256 c24332570f8ac155847372a4f9019a47a2e3c8c15435584dac4153b8eb300bc7 SHA512 d0e23b98bc9109e7e4d8a6459f73d1f9a06a3da71593613e22c5d0f31a8ad7473242b07690c6f22f35358ed869ffa7160d0daa65937462442bfc9028794321ea WHIRLPOOL 7992f776ac36277ce83898920ed5a8abc6b031f1d88214150c362c6f5befc869eb9901bd346da74da9fb56bda500fe9d3d9ff8dd46f1b3f257691cb106754a93
DIST bitcoin-v0.8.5.tgz 3181865 SHA256 39f170aa29292d530371d287f2036aa372d1e255cf46c29588b8c5a3afedcea4 SHA512 ac605f202b4b8c2fc3574517018817d7ac6ac9296040052db67232b0fd136446895986e25f1b4aa6a888a0ec510ad2a69bf09c65b95deba1d9b2ea6ece62d9c7 WHIRLPOOL cfe8839fd5bc6e22cfe485c63e2a7f261c8817c0d090766ae2dac6303612a977ebea87df2df473a5cebaaee9a2712b8a97aa3f6613f88732be06b7a9fa18351b
EBUILD bitcoind-0.8.5.ebuild 2901 SHA256 29b893bccea8dff76454b85415325b61e73f4c3b56eecd7427c7bdf461e206bb SHA512 13b6643ff41aff6c96850f388cca56ef85fec87a7cbd0399c433ed108f2c722beae6bc12fa115eced7d6568dac5f90ae7510a57b523e972562db06ef3e6c99a1 WHIRLPOOL 5be78f2d708ab2c3d4bba586501818f4db2a1b63c38a8cad08f350f4107f88b0f020c27f7063194554274e65092bee1d1f20e26e221b4b5f4db4436d9ce04a02
-MISC ChangeLog 19073 SHA256 ade0df385e3bd6a33e9fa47325eb67906c34169565929ef8a44d3b5b78c88986 SHA512 616221a8b8f6e1163f2a1f3655040efa675335602dbc1d5d6ae244e2250e078ad5975fbf817c931771ee6aa919b6951bd3fe16d4a5e92f1ee093dbdc2dc6f496 WHIRLPOOL 54f1d61f48002cba93807d839de4c56d93db97d440fc48d805eb83edf9d21e179ccc53d245ee26f60f71157adc8a278f73d19f535ed60895ac7a2edbc2c069ae
+MISC ChangeLog 19383 SHA256 d9a845c774c54e69fdc6c89c9a450d7b8afb95a68aadb5c502965f602f6c6a3c SHA512 e2a002a87ea24f5b4e680d44cbed61b9a47888c0fd597216313b3b95ef6a934ae9246ab014419ce6ce6f78c2ddaf5a8a4c732a001e302b467e090d60af05b114 WHIRLPOOL 225578bab0590e114ce0967766d25a80eff2c1e826c32dae2876c2f808d87cd085680c987b0f55d5328e08d5960944d44bf8ebc9c59710499375778e6084f1d0
MISC metadata.xml 463 SHA256 58c5f6c7895db712324d13345c42443ceb76151773a453ffb09b11da4249a6a9 SHA512 b4dcc40e26df005880c6fa0fdcd1bda4345f893e32f833a4ebb8a0c6160a0a1d92a870552f4c333dec3ba9d5bb271354623bb68c48c153bba08ccae4552ca379 WHIRLPOOL 63e40f19861d142e8501fa8ba5aa8ac8a3dfcf80a56a7834425320ed53be1bdaaea5c9be9e5c0acd8eb27052cb083c49a310444d0f33ae78fd00c44bad193015
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.22 (GNU/Linux)
+
+iQIcBAEBCAAGBQJSZquSAAoJEJOE+m71LUu62nYP/iyAmPbqMDoUg5fR9mN8Oq/y
+e8x0xrxD7ksoulluslYoWdk575JG/fWKR03mbChm7HH2b5g3jAUkluQmB2LpmBRu
+uhRUmH3XembEQ/i6Krfb2vNfQ8FnSAnrJV4ZmU7JNOhWeLHVZNtXnM8GIluVdc6k
+Kd3SccEGtErhafJwa7y6f+pwLYY5bwCAsx19AGRUXDUO6/XHy8ziF01WlNDVCei7
+J4l2mE5HL9/OQrwzIfpb2vAQuxDSIvzAE1+Hettrlc8pDYxdFIvrQHhqRAs2QJ/Z
+t81RO3uEf7/4ZevuQEAGzXclMheuMfKF87IqZbVjIBsBEPtonb9lesh9U7yMyyr2
+nrtvPVCEybUZS4Z7HK5W36UoKPx4A2OrPam3xVM23h9E+pxHOdLiUMASzhof3QjS
+LhjKISmM3TW/FEN565z0YVWBw3SwDvbeYziRYc6t1suceXFYRj+YYJs3ph09qhNE
+ptmQzdf6hXmzM7acirrq6OqOMGoKYPTrGaJeH55NZ1vWhmAGXCDrRMsiJ0QFJGe4
+qK1Q2ekZCC3MELVcCoOB6yFGV3TR8aac+K2Ro/2EPL1YjGCI9MdZQbt/t6q073uk
+ReMeIampPXYxtCId2suV276xFdi7/UFxbB5Q61ff5027HcLu2wyqMoobI9c4J+Vm
+HwUNnjyZ4gV2Aha6+SEn
+=gpsd
+-----END PGP SIGNATURE-----
diff --git a/net-p2p/bitcoind/files/0.4.2-Makefile.gentoo b/net-p2p/bitcoind/files/0.4.2-Makefile.gentoo
deleted file mode 100644
index fc0bf5abf2f3..000000000000
--- a/net-p2p/bitcoind/files/0.4.2-Makefile.gentoo
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright (c) 2009-2010 Satoshi Nakamoto, 2010 Myckel Habets, 2011 Luke Dashjr
-# Distributed under the MIT/X11 software license, see the accompanying
-# file license.txt or http://www.opensource.org/licenses/mit-license.php.
-
-USE_SSL :=
-USE_UPNP :=
-
-WXINCLUDEPATHS=$(shell wx-config --cxxflags)
-WXLIBS=$(shell wx-config --libs)
-
-CXXFLAGS := -g -O2
-LDFLAGS :=
-
-xLDFLAGS += \
- -Wl,-Bdynamic \
- -l boost_system$(BOOST_LIB_SUFFIX) \
- -l boost_filesystem$(BOOST_LIB_SUFFIX) \
- -l boost_program_options$(BOOST_LIB_SUFFIX) \
- -l boost_thread$(BOOST_LIB_SUFFIX) \
- -l ssl \
- -l crypto \
- -l crypto++ \
- -l z \
- -l dl
-
-xCXXFLAGS += -pthread
-xLDFLAGS += -pthread
-
-xCXXFLAGS += $(BOOST_CXXFLAGS)
-xLDFLAGS += $(BOOST_LDFLAGS)
-
-xCXXFLAGS += $(DB_CXXFLAGS)
-xLDFLAGS += $(DB_LDFLAGS)
-
-ifneq ($(USE_SSL),)
- xCXXFLAGS += -DUSE_SSL
-endif
-
-ifneq ($(USE_UPNP),)
- xLDFLAGS += -l miniupnpc
- xCXXFLAGS += -DUSE_UPNP=$(USE_UPNP)
-endif
-
-xCXXFLAGS += -D__WXDEBUG__
-xCXXFLAGS += -DNOPCH
-xCXXFLAGS += -Wno-invalid-offsetof -Wformat
-
-xCXXFLAGS += $(CXXFLAGS)
-xLDFLAGS += $(LDFLAGS)
-
-HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
- checkpoints.h crypter.h keystore.h wallet.h protocol.h \
- script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h
-
-OBJS= \
- obj/checkpoints.o \
- obj/crypter.o \
- obj/util.o \
- obj/script.o \
- obj/db.o \
- obj/net.o \
- obj/protocol.o \
- obj/irc.o \
- obj/keystore.o \
- obj/main.o \
- obj/wallet.o \
- obj/rpc.o \
- obj/init.o
-
-
-all: bitcoin
-
-
-obj/%.o: %.cpp $(HEADERS)
- $(CXX) -c $(xCXXFLAGS) $(WXINCLUDEPATHS) -DGUI -o $@ $<
-
-bitcoin: $(OBJS) obj/ui.o obj/uibase.o
- $(CXX) -o $@ $^ $(WXLIBS) $(xLDFLAGS)
-
-
-obj/nogui/%.o: %.cpp $(HEADERS)
- $(CXX) -c $(xCXXFLAGS) -o $@ $<
-
-bitcoind: $(OBJS:obj/%=obj/nogui/%)
- $(CXX) -o $@ $^ $(xLDFLAGS)
diff --git a/net-p2p/bitcoind/files/0.4.4+bip16-eligius_sendfee.patch b/net-p2p/bitcoind/files/0.4.4+bip16-eligius_sendfee.patch
deleted file mode 100644
index a289a51c5d82..000000000000
--- a/net-p2p/bitcoind/files/0.4.4+bip16-eligius_sendfee.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-diff --git a/src/main.cpp b/src/main.cpp
-index 9384916..242867b 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -421,8 +421,10 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
- if ((int64)nLockTime > INT_MAX)
- return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet");
-
-+ bool fIsMine = pwalletMain->IsMine(*this);
-+
- // Rather not work on nonstandard transactions (unless -testnet)
-- if (!fTestNet && !IsStandard())
-+ if (!fTestNet && !IsStandard() && !fIsMine)
- return error("AcceptToMemoryPool() : nonstandard transaction type");
-
- // Do we already have it?
-@@ -477,7 +479,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
- }
-
- // Check for non-standard pay-to-script-hash in inputs
-- if (!AreInputsStandard(mapInputs) && !fTestNet)
-+ if (!AreInputsStandard(mapInputs) && !fIsMine && !fTestNet)
- return error("AcceptToMemoryPool() : nonstandard transaction input");
-
- // Note: if you modify this code to accept non-standard transactions, then
-@@ -487,8 +489,11 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
- int64 nFees = GetValueIn(mapInputs)-GetValueOut();
- unsigned int nSize = ::GetSerializeSize(*this, SER_NETWORK);
-
-+ if (!fIsMine)
-+ {
-+
- // Don't accept it if it can't get into a block
-- if (nFees < GetMinFee(1000, true, true))
-+ if (nFees < GetMinFee(1000, true, GMF_RELAY))
- return error("AcceptToMemoryPool() : not enough fees");
-
- // Continuously rate-limit free transactions
-@@ -516,6 +521,8 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
- }
- }
-
-+ }
-+
- // Check against previous transactions
- // This is done last to help prevent CPU exhaustion denial-of-service attacks.
- if (!ConnectInputs(mapInputs, mapUnused, CDiskTxPos(1,1,1), pindexBest, false, false))
-@@ -2976,6 +2983,9 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
- // Priority is sum(valuein * age) / txsize
- dPriority /= ::GetSerializeSize(tx, SER_NETWORK);
-
-+ if (pwalletMain->IsMine(tx))
-+ dPriority += 100.;
-+
- if (porphan)
- porphan->dPriority = dPriority;
- else
-@@ -3013,7 +3023,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
-
- // Transaction fee required depends on block size
- bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority));
-- int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree);
-+ int64 nMinFee = pwalletMain->IsMine(tx) ? 0 : tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK);
-
- // Connecting shouldn't fail due to dependency on other memory pool transactions
- // because we're already processing them in order of dependency
-diff --git a/src/main.h b/src/main.h
-index 5df335a..8e533d1 100644
---- a/src/main.h
-+++ b/src/main.h
-@@ -389,6 +389,13 @@ public:
- typedef std::map<uint256, std::pair<CTxIndex, CTransaction> > MapPrevTx;
-
-
-+enum GetMinFee_mode
-+{
-+ GMF_BLOCK,
-+ GMF_RELAY,
-+ GMF_SEND,
-+};
-+
- //
- // The basic transaction that is broadcasted on the network and contained in
- // blocks. A transaction can contain multiple inputs and outputs.
-@@ -562,13 +569,49 @@ public:
- return dPriority > COIN * 144 / 250;
- }
-
-- int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, bool fForRelay=false) const
-+ int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, enum GetMinFee_mode mode=GMF_BLOCK) const
- {
- // Base fee is either MIN_TX_FEE or MIN_RELAY_TX_FEE
-- int64 nBaseFee = fForRelay ? MIN_RELAY_TX_FEE : MIN_TX_FEE;
-+ int64 nBaseFee = (mode == GMF_RELAY) ? MIN_RELAY_TX_FEE : MIN_TX_FEE;
-
- unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK);
- unsigned int nNewBlockSize = nBlockSize + nBytes;
-+ int64 nMinFeeAlt;
-+
-+ {
-+ // Base fee is 0.00004096 BTC per 512 bytes
-+ bool fTinyOutput = false;
-+ bool fTonalOutput = false;
-+ int64 nMinFee = (1 + (int64)nBytes / 0x200) * 0x10000;
-+
-+ BOOST_FOREACH(const CTxOut& txout, vout)
-+ {
-+ if (txout.nValue < 0x100)
-+ {
-+ fTinyOutput = true;
-+ break;
-+ }
-+ if (0 == txout.nValue % 0x10000)
-+ fTonalOutput = true;
-+ }
-+
-+ // Charge extra for ridiculously tiny outputs
-+ if (fTinyOutput)
-+ nMinFee *= 0x10;
-+ else
-+ // Waive the fee in a tonal-sized "free tranaction area" if at least one output is TBC (and under 512 bytes) ;)
-+ if (fTonalOutput && nNewBlockSize < 0x8000 && nBytes < 0x200)
-+ nMinFee = 0;
-+ else
-+ if (fAllowFree)
-+ {
-+ // Give a discount to the first so many tx
-+ nMinFee /= 0x10;
-+ }
-+
-+ nMinFeeAlt = nMinFee;
-+ }
-+
- int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee;
-
- if (fAllowFree)
-@@ -594,6 +637,8 @@ public:
- if (txout.nValue < CENT)
- nMinFee = nBaseFee;
-
-+ nMinFee = std::min(nMinFee, nMinFeeAlt);
-+
- // Raise the price as the block approaches full
- if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2)
- {
-diff --git a/src/net.cpp b/src/net.cpp
-index a8d3d0b..245b1b9 100644
---- a/src/net.cpp
-+++ b/src/net.cpp
-@@ -1217,6 +1217,7 @@ void MapPort(bool /* unused fMapPort */)
-
-
- static const char *strDNSSeed[] = {
-+ "relay.eligius.st",
- "bitseed.xf2.org",
- "dnsseed.bluematt.me",
- "seed.bitcoin.sipa.be",
-diff --git a/src/wallet.cpp b/src/wallet.cpp
-index 9f7422d..ac9703f 100644
---- a/src/wallet.cpp
-+++ b/src/wallet.cpp
-@@ -939,6 +939,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
- int64 nChange = nValueIn - nValue - nFeeRet;
- // if sub-cent change is required, the fee must be raised to at least MIN_TX_FEE
- // or until nChange becomes zero
-+ // NOTE: this depends on the exact behaviour of GetMinFee
- if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < CENT)
- {
- int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet);
-@@ -992,7 +993,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
- // Check that enough fee is included
- int64 nPayFee = nTransactionFee * (1 + (int64)nBytes / 1000);
- bool fAllowFree = CTransaction::AllowFree(dPriority);
-- int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree);
-+ int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree, GMF_SEND);
- if (nFeeRet < max(nPayFee, nMinFee))
- {
- nFeeRet = max(nPayFee, nMinFee);
diff --git a/net-p2p/bitcoind/files/0.4.7-reopen_log_file.patch b/net-p2p/bitcoind/files/0.4.7-reopen_log_file.patch
deleted file mode 100644
index 965f90ecb942..000000000000
--- a/net-p2p/bitcoind/files/0.4.7-reopen_log_file.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-diff --git a/src/init.cpp b/src/init.cpp
-index 393d250..fd8bb1f 100644
---- a/src/init.cpp
-+++ b/src/init.cpp
-@@ -71,6 +71,10 @@ void HandleSIGTERM(int)
- fRequestShutdown = true;
- }
-
-+void HandleSIGHUP(int)
-+{
-+ fReopenDebugLog = true;
-+}
-
-
-
-@@ -132,7 +136,13 @@ bool AppInit2(int argc, char* argv[])
- sa.sa_flags = 0;
- sigaction(SIGTERM, &sa, NULL);
- sigaction(SIGINT, &sa, NULL);
-- sigaction(SIGHUP, &sa, NULL);
-+
-+ // Reopen debug.log on SIGHUP
-+ struct sigaction sa_hup;
-+ sa_hup.sa_handler = HandleSIGHUP;
-+ sigemptyset(&sa_hup.sa_mask);
-+ sa_hup.sa_flags = 0;
-+ sigaction(SIGHUP, &sa_hup, NULL);
- #endif
-
- //
-diff --git a/src/util.cpp b/src/util.cpp
-index cae01df..0b804c1 100644
---- a/src/util.cpp
-+++ b/src/util.cpp
-@@ -42,6 +42,7 @@ string strMiscWarning;
- bool fTestNet = false;
- bool fNoListen = false;
- bool fLogTimestamps = false;
-+bool fReopenDebugLog = false;
-
-
-
-@@ -166,6 +167,13 @@ int GetRandInt(int nMax)
-
-
-
-+string GetDebugLogName()
-+{
-+ char pszFile[MAX_PATH+100];
-+ GetDataDir(pszFile);
-+ strlcat(pszFile, "/debug.log", sizeof(pszFile));
-+ return pszFile;
-+}
-
- inline int OutputDebugStringF(const char* pszFormat, ...)
- {
-@@ -185,10 +193,7 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
-
- if (!fileout)
- {
-- char pszFile[MAX_PATH+100];
-- GetDataDir(pszFile);
-- strlcat(pszFile, "/debug.log", sizeof(pszFile));
-- fileout = fopen(pszFile, "a");
-+ fileout = fopen(GetDebugLogName().c_str(), "a");
- if (fileout) setbuf(fileout, NULL); // unbuffered
- }
- if (fileout)
-@@ -197,6 +202,13 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
- static boost::mutex mutexDebugLog;
- boost::mutex::scoped_lock scoped_lock(mutexDebugLog);
-
-+ // reopen the log file, if requested
-+ if (fReopenDebugLog) {
-+ fReopenDebugLog = false;
-+ if (freopen(GetDebugLogName().c_str(), "a", fileout) != NULL)
-+ setbuf(fileout, NULL); // unbuffered
-+ }
-+
- // Debug print useful for profiling
- if (fLogTimestamps && fStartedNewLine)
- fprintf(fileout, "%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
-diff --git a/src/util.h b/src/util.h
-index 284cf33..c8ce9b8 100644
---- a/src/util.h
-+++ b/src/util.h
-@@ -162,6 +162,7 @@ extern std::string strMiscWarning;
- extern bool fTestNet;
- extern bool fNoListen;
- extern bool fLogTimestamps;
-+extern bool fReopenDebugLog;
-
- void RandAddSeed();
- void RandAddSeedPerfmon();
diff --git a/net-p2p/bitcoind/files/0.5.0.5+bip16-eligius_sendfee.patch b/net-p2p/bitcoind/files/0.5.0.5+bip16-eligius_sendfee.patch
deleted file mode 100644
index ada609211509..000000000000
--- a/net-p2p/bitcoind/files/0.5.0.5+bip16-eligius_sendfee.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-diff --git a/src/main.cpp b/src/main.cpp
-index 2e8b43d..af5e805 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -428,8 +428,10 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
- if ((int64)nLockTime > INT_MAX)
- return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet");
-
-+ bool fIsMine = pwalletMain->IsMine(*this);
-+
- // Rather not work on nonstandard transactions (unless -testnet)
-- if (!fTestNet && !IsStandard())
-+ if (!fTestNet && !IsStandard() && !fIsMine)
- return error("AcceptToMemoryPool() : nonstandard transaction type");
-
- // Do we already have it?
-@@ -494,8 +496,11 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
- int64 nFees = GetValueIn(mapInputs)-GetValueOut();
- unsigned int nSize = ::GetSerializeSize(*this, SER_NETWORK);
-
-+ if (!fIsMine)
-+ {
-+
- // Don't accept it if it can't get into a block
-- if (nFees < GetMinFee(1000, true, true))
-+ if (nFees < GetMinFee(1000, true, GMF_RELAY))
- return error("AcceptToMemoryPool() : not enough fees");
-
- // Continuously rate-limit free transactions
-@@ -523,6 +528,8 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
- }
- }
-
-+ }
-+
- // Check against previous transactions
- // This is done last to help prevent CPU exhaustion denial-of-service attacks.
- if (!ConnectInputs(mapInputs, mapUnused, CDiskTxPos(1,1,1), pindexBest, false, false))
-@@ -3044,6 +3051,9 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
- // Priority is sum(valuein * age) / txsize
- dPriority /= ::GetSerializeSize(tx, SER_NETWORK);
-
-+ if (pwalletMain->IsMine(tx))
-+ dPriority += 100.;
-+
- if (porphan)
- porphan->dPriority = dPriority;
- else
-@@ -3081,7 +3091,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
-
- // Transaction fee required depends on block size
- bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority));
-- int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree);
-+ int64 nMinFee = pwalletMain->IsMine(tx) ? 0 : tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK);
-
- // Connecting shouldn't fail due to dependency on other memory pool transactions
- // because we're already processing them in order of dependency
-diff --git a/src/main.h b/src/main.h
-index a918eb5..d3910cd 100644
---- a/src/main.h
-+++ b/src/main.h
-@@ -391,6 +391,13 @@ public:
- typedef std::map<uint256, std::pair<CTxIndex, CTransaction> > MapPrevTx;
-
-
-+enum GetMinFee_mode
-+{
-+ GMF_BLOCK,
-+ GMF_RELAY,
-+ GMF_SEND,
-+};
-+
- //
- // The basic transaction that is broadcasted on the network and contained in
- // blocks. A transaction can contain multiple inputs and outputs.
-@@ -568,13 +575,49 @@ public:
- return dPriority > COIN * 144 / 250;
- }
-
-- int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, bool fForRelay=false) const
-+ int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, enum GetMinFee_mode mode=GMF_BLOCK) const
- {
- // Base fee is either MIN_TX_FEE or MIN_RELAY_TX_FEE
-- int64 nBaseFee = fForRelay ? MIN_RELAY_TX_FEE : MIN_TX_FEE;
-+ int64 nBaseFee = (mode == GMF_RELAY) ? MIN_RELAY_TX_FEE : MIN_TX_FEE;
-
- unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK);
- unsigned int nNewBlockSize = nBlockSize + nBytes;
-+ int64 nMinFeeAlt;
-+
-+ {
-+ // Base fee is 0.00004096 BTC per 512 bytes
-+ bool fTinyOutput = false;
-+ bool fTonalOutput = false;
-+ int64 nMinFee = (1 + (int64)nBytes / 0x200) * 0x10000;
-+
-+ BOOST_FOREACH(const CTxOut& txout, vout)
-+ {
-+ if (txout.nValue < 0x100)
-+ {
-+ fTinyOutput = true;
-+ break;
-+ }
-+ if (0 == txout.nValue % 0x10000)
-+ fTonalOutput = true;
-+ }
-+
-+ // Charge extra for ridiculously tiny outputs
-+ if (fTinyOutput)
-+ nMinFee *= 0x10;
-+ else
-+ // Waive the fee in a tonal-sized "free tranaction area" if at least one output is TBC (and under 512 bytes) ;)
-+ if (fTonalOutput && nNewBlockSize < 0x8000 && nBytes < 0x200)
-+ nMinFee = 0;
-+ else
-+ if (fAllowFree)
-+ {
-+ // Give a discount to the first so many tx
-+ nMinFee /= 0x10;
-+ }
-+
-+ nMinFeeAlt = nMinFee;
-+ }
-+
- int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee;
-
- if (fAllowFree)
-@@ -600,6 +643,8 @@ public:
- if (txout.nValue < CENT)
- nMinFee = nBaseFee;
-
-+ nMinFee = std::min(nMinFee, nMinFeeAlt);
-+
- // Raise the price as the block approaches full
- if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2)
- {
-diff --git a/src/net.cpp b/src/net.cpp
-index f37c675..5cb448d 100644
---- a/src/net.cpp
-+++ b/src/net.cpp
-@@ -1268,6 +1268,7 @@ void MapPort(bool /* unused fMapPort */)
-
-
- static const char *strDNSSeed[] = {
-+ "relay.eligius.st",
- "bitseed.xf2.org",
- "dnsseed.bluematt.me",
- "seed.bitcoin.sipa.be",
-diff --git a/src/wallet.cpp b/src/wallet.cpp
-index 20c3eab..e71994b 100644
---- a/src/wallet.cpp
-+++ b/src/wallet.cpp
-@@ -959,6 +959,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
- int64 nChange = nValueIn - nValue - nFeeRet;
- // if sub-cent change is required, the fee must be raised to at least MIN_TX_FEE
- // or until nChange becomes zero
-+ // NOTE: this depends on the exact behaviour of GetMinFee
- if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < CENT)
- {
- int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet);
-@@ -1012,7 +1013,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
- // Check that enough fee is included
- int64 nPayFee = nTransactionFee * (1 + (int64)nBytes / 1000);
- bool fAllowFree = CTransaction::AllowFree(dPriority);
-- int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree);
-+ int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree, GMF_SEND);
- if (nFeeRet < max(nPayFee, nMinFee))
- {
- nFeeRet = max(nPayFee, nMinFee);
diff --git a/net-p2p/bitcoind/files/0.6.0.8-reopen_log_file.patch b/net-p2p/bitcoind/files/0.6.0.8-reopen_log_file.patch
deleted file mode 100644
index ee0efc80b8d2..000000000000
--- a/net-p2p/bitcoind/files/0.6.0.8-reopen_log_file.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-diff --git a/src/init.cpp b/src/init.cpp
-index 586e3da..da695f4 100644
---- a/src/init.cpp
-+++ b/src/init.cpp
-@@ -97,6 +97,10 @@ void HandleSIGTERM(int)
- fRequestShutdown = true;
- }
-
-+void HandleSIGHUP(int)
-+{
-+ fReopenDebugLog = true;
-+}
-
-
-
-@@ -158,7 +162,13 @@ bool AppInit2(int argc, char* argv[])
- sa.sa_flags = 0;
- sigaction(SIGTERM, &sa, NULL);
- sigaction(SIGINT, &sa, NULL);
-- sigaction(SIGHUP, &sa, NULL);
-+
-+ // Reopen debug.log on SIGHUP
-+ struct sigaction sa_hup;
-+ sa_hup.sa_handler = HandleSIGHUP;
-+ sigemptyset(&sa_hup.sa_mask);
-+ sa_hup.sa_flags = 0;
-+ sigaction(SIGHUP, &sa_hup, NULL);
- #endif
-
- //
-diff --git a/src/util.cpp b/src/util.cpp
-index 94bdba6..5718f41 100644
---- a/src/util.cpp
-+++ b/src/util.cpp
-@@ -44,6 +44,7 @@ bool fTestNet = false;
- bool fNoListen = false;
- bool fLogTimestamps = false;
- CMedianFilter<int64> vTimeOffsets(200,0);
-+bool fReopenDebugLog = false;
-
-
-
-@@ -167,6 +168,13 @@ int GetRandInt(int nMax)
-
-
-
-+string GetDebugLogName()
-+{
-+ char pszFile[MAX_PATH+100];
-+ GetDataDir(pszFile);
-+ strlcat(pszFile, "/debug.log", sizeof(pszFile));
-+ return pszFile;
-+}
-
- inline int OutputDebugStringF(const char* pszFormat, ...)
- {
-@@ -186,10 +194,7 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
-
- if (!fileout)
- {
-- char pszFile[MAX_PATH+100];
-- GetDataDir(pszFile);
-- strlcat(pszFile, "/debug.log", sizeof(pszFile));
-- fileout = fopen(pszFile, "a");
-+ fileout = fopen(GetDebugLogName().c_str(), "a");
- if (fileout) setbuf(fileout, NULL); // unbuffered
- }
- if (fileout)
-@@ -198,6 +203,13 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
- static boost::mutex mutexDebugLog;
- boost::mutex::scoped_lock scoped_lock(mutexDebugLog);
-
-+ // reopen the log file, if requested
-+ if (fReopenDebugLog) {
-+ fReopenDebugLog = false;
-+ if (freopen(GetDebugLogName().c_str(), "a", fileout) != NULL)
-+ setbuf(fileout, NULL); // unbuffered
-+ }
-+
- // Debug print useful for profiling
- if (fLogTimestamps && fStartedNewLine)
- fprintf(fileout, "%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str());
-diff --git a/src/util.h b/src/util.h
-index e0821cc..737f239 100644
---- a/src/util.h
-+++ b/src/util.h
-@@ -123,6 +123,7 @@ extern std::string strMiscWarning;
- extern bool fTestNet;
- extern bool fNoListen;
- extern bool fLogTimestamps;
-+extern bool fReopenDebugLog;
-
- void RandAddSeed();
- void RandAddSeedPerfmon();
diff --git a/net-p2p/bitcoind/files/0.8.0-sys_leveldb.patch b/net-p2p/bitcoind/files/0.8.0-sys_leveldb.patch
deleted file mode 100644
index 5b540c358f70..000000000000
--- a/net-p2p/bitcoind/files/0.8.0-sys_leveldb.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
-index 1c6bc0a..db431de 100644
---- a/bitcoin-qt.pro
-+++ b/bitcoin-qt.pro
-@@ -2,7 +2,7 @@ TEMPLATE = app
- TARGET = bitcoin-qt
- VERSION = 0.8.0
- INCLUDEPATH += src src/json src/qt
--DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
-+DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV
- CONFIG += no_include_pwd
- CONFIG += thread
-
-@@ -96,24 +96,28 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
- QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
- }
-
-+contains(USE_SYSTEM_LEVELDB, 1) {
-+ LIBS += -lleveldb
-+} else {
- INCLUDEPATH += src/leveldb/include src/leveldb/helpers
--LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
-+LIBS += $$PWD/src/leveldb/libleveldb.a
- !win32 {
-- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS\" libleveldb.a libmemenv.a
-+ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS\" libleveldb.a
- } else {
- # make an educated guess about what the ranlib command is called
- isEmpty(QMAKE_RANLIB) {
- QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
- }
- LIBS += -lshlwapi
-- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
-+ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS\" libleveldb.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 is no other way to do it.
--QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
-+QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true
-
- # regenerate src/build.h
- !win32|contains(USE_BUILD_INFO, 1) {
-diff --git a/src/leveldb.cpp b/src/leveldb.cpp
-index b41764f..f71e801 100644
---- a/src/leveldb.cpp
-+++ b/src/leveldb.cpp
-@@ -8,7 +8,9 @@
- #include <leveldb/env.h>
- #include <leveldb/cache.h>
- #include <leveldb/filter_policy.h>
-+#ifndef LEVELDB_WITHOUT_MEMENV
- #include <memenv/memenv.h>
-+#endif
-
- #include <boost/filesystem.hpp>
-
-@@ -42,8 +44,12 @@ CLevelDB::CLevelDB(const boost::filesystem::path &path, size_t nCacheSize, bool
- options = GetOptions(nCacheSize);
- options.create_if_missing = true;
- if (fMemory) {
-+#ifndef LEVELDB_WITHOUT_MEMENV
- penv = leveldb::NewMemEnv(leveldb::Env::Default());
- options.env = penv;
-+#else
-+ throw std::runtime_error("CLevelDB(): compiled without memenv support");
-+#endif
- } else {
- if (fWipe) {
- printf("Wiping LevelDB in %s\n", path.string().c_str());
-diff --git a/src/makefile.unix b/src/makefile.unix
-index ece2f59..4cbeaba 100644
---- a/src/makefile.unix
-+++ b/src/makefile.unix
-@@ -36,6 +36,10 @@ LIBS += \
- -l ssl \
- -l crypto
-
-+TESTLIBS += \
-+ -Wl,-B$(LMODE) \
-+ -l boost_unit_test_framework$(BOOST_LIB_SUFFIX)
-+
- ifndef USE_UPNP
- override USE_UPNP = -
- endif
-@@ -100,8 +104,7 @@ xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-para
- # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.
- xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
-
--OBJS= \
-- leveldb/libleveldb.a \
-+BASEOBJS := \
- obj/alert.o \
- obj/version.o \
- obj/checkpoints.o \
-@@ -110,7 +113,6 @@ OBJS= \
- obj/crypter.o \
- obj/key.o \
- obj/db.o \
-- obj/init.o \
- obj/irc.o \
- obj/keystore.o \
- obj/main.o \
-@@ -131,24 +133,43 @@ OBJS= \
- obj/hash.o \
- obj/bloom.o \
- obj/noui.o \
-- obj/leveldb.o \
- obj/txdb.o
-
-+OBJS := \
-+ obj/leveldb.o \
-+ obj/init.o \
-+ $(BASEOBJS)
-+
-+TESTOBJS := \
-+ obj-test/leveldb.o \
-+ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
-+ $(BASEOBJS)
-+
-
- all: bitcoind
-
- test check: test_bitcoin FORCE
- ./test_bitcoin
-
-+ifdef USE_SYSTEM_LEVELDB
-+ LIBS += -lleveldb
-+ TESTLIBS += -lmemenv
-+else
- #
- # LevelDB support
- #
- MAKEOVERRIDES =
--LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
-+LIBS += $(CURDIR)/leveldb/libleveldb.a
-+TESTLIBS += $(CURDIR)/leveldb/libmemenv.a
- DEFS += $(addprefix -I,$(CURDIR)/leveldb/include)
- DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
- leveldb/libleveldb.a:
-- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd ..
-+ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd ..
-+leveldb/libmemenv.a:
-+ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd ..
-+OBJS += leveldb/libleveldb.a
-+TESTOBJS += leveldb/libmemenv.a
-+endif
-
- # auto-generated dependencies:
- -include obj/*.P
-@@ -159,27 +180,29 @@ obj/build.h: FORCE
- version.cpp: obj/build.h
- DEFS += -DHAVE_BUILD_INFO
-
--obj/%.o: %.cpp
-- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
-+P_TO_D = \
- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
-- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-+ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
- rm -f $(@:%.o=%.d)
-
--bitcoind: $(OBJS:obj/%=obj/%)
-- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
-+obj/%.o: %.cpp
-+ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
-+ $(P_TO_D)
-
--TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
-+bitcoind: $(OBJS)
-+ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
-
- obj-test/%.o: test/%.cpp
- $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
-- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
-- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
-- rm -f $(@:%.o=%.d)
-+ $(P_TO_D)
-+
-+obj-test/leveldb.o: leveldb.cpp
-+ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
-+ $(P_TO_D)
-
--test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
-- $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(xLDFLAGS) $(LIBS)
-+test_bitcoin: $(TESTOBJS)
-+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
-
- clean:
- -rm -f bitcoind test_bitcoin