diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2013-10-22 16:35:33 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-10-22 16:35:33 +0000 |
commit | b42cb783de6f4e76fd3b120c3037822f64b8ab55 (patch) | |
tree | d035753c109e67f10de4f2ffdab6800eb10c463e /net-p2p/bitcoin-qt | |
parent | Version bumps (diff) | |
download | historical-b42cb783de6f4e76fd3b120c3037822f64b8ab55.tar.gz historical-b42cb783de6f4e76fd3b120c3037822f64b8ab55.tar.bz2 historical-b42cb783de6f4e76fd3b120c3037822f64b8ab55.zip |
Remove older patches
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'net-p2p/bitcoin-qt')
-rw-r--r-- | net-p2p/bitcoin-qt/ChangeLog | 6 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/Manifest | 30 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/files/0.5.0.5+bip16-eligius_sendfee.patch | 169 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/files/0.8.0-sys_leveldb.patch | 195 |
4 files changed, 19 insertions, 381 deletions
diff --git a/net-p2p/bitcoin-qt/ChangeLog b/net-p2p/bitcoin-qt/ChangeLog index e5ebc03efe32..a9fd217c4b63 100644 --- a/net-p2p/bitcoin-qt/ChangeLog +++ b/net-p2p/bitcoin-qt/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-p2p/bitcoin-qt # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoin-qt/ChangeLog,v 1.76 2013/10/14 00:36:09 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoin-qt/ChangeLog,v 1.77 2013/10/22 16:35:24 blueness Exp $ + + 22 Oct 2013; Anthony G. Basile <blueness@gentoo.org> + -files/0.5.0.5+bip16-eligius_sendfee.patch, -files/0.8.0-sys_leveldb.patch: + Remove older patches 14 Oct 2013; Anthony G. Basile <blueness@gentoo.org> -bitcoin-qt-0.5.8_rc2.ebuild, -bitcoin-qt-0.6.3.ebuild, diff --git a/net-p2p/bitcoin-qt/Manifest b/net-p2p/bitcoin-qt/Manifest index 2323e913353a..cb8958391ca7 100644 --- a/net-p2p/bitcoin-qt/Manifest +++ b/net-p2p/bitcoin-qt/Manifest @@ -1,28 +1,26 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 -AUX 0.5.0.5+bip16-eligius_sendfee.patch 6739 SHA256 2e16bca9106bcb8056efc5a60791226119ca011cd007e4b547de4c23f0d8e9a4 SHA512 213b12973557993cbe7fe4a8dcaccec0bb732dc3f45f242d4e42de576af75e1f76d3d1aa4501bf4f63e304773505ca768c1a5eb7f914b87bbb34f81b5ece1b87 WHIRLPOOL 6f285997fac74ca70ede3baeb708f6d7ba3872fb390cddb56da9225955a4e78c3eb466fc3792a12c527d6f4b1e0d3637f2d67553b28c51b32a1f61cf92b01a06 -AUX 0.8.0-sys_leveldb.patch 6739 SHA256 7a9548955cf923badfd0eebf5c86531de55f15b93c97da609eb2a3cbf191bcc7 SHA512 c15c36165deff50762ae6d710c7e7b341b78ee395be4ec976e8e3a2d4aa3902f78226e03d85d43033299e1ae6a4ec48cdc4e912a90c065125c1a2a07933109a5 WHIRLPOOL 5f86b372bb7226626fd4eee5bfe2519ae84db8851a591e6ee204b508203c0723b7327ae5c1e8a68c8e961471f95939ef212a301678760531508d15c5aecaf29e AUX 0.8.2-sys_leveldb.patch 6647 SHA256 45ac78376c1983babf0e001b18196b777cd4bfca1c6b92fad62302d70ec9aabf SHA512 0aaa00584bc56984133f388523b2084d94a620987367e0eff39cc6debc39738586fb991e7cb84f54eb56f27992929d562261bb867e1091679a51839185626edf WHIRLPOOL c027065cedb40a946dc7fa1f5dea6908d35290147f53df178d7ff416c2a5d5bd9f7e6802779d8a0a04044e04bfc4dd76433ad2dcb48b65869d3fbfe8c7bb3748 DIST 0.8.2-1stclassmsg.patch.xz 1788 SHA256 ae871cbd949abb6c6c57eade016b2945ea95672958362439db76697aa23400af SHA512 b511c0dac07710497d0d2aa814049b72db1186a5f86f2b7837e7927989be75319a83eb10dd37fbf4f5aba7c4266f7a35d0b9abb24384df2f93e1cd8090bd7a55 WHIRLPOOL e7a05cda0ee01bce08ce5a17c8b72f6b9f1636c916f38e03cb0a2604094959f44c58e54c35be6aefddc81e91f1e6b416d23480a8ac0e34a186b80ce349cebaa5 DIST bitcoin-v0.8.5.tgz 3181865 SHA256 39f170aa29292d530371d287f2036aa372d1e255cf46c29588b8c5a3afedcea4 SHA512 ac605f202b4b8c2fc3574517018817d7ac6ac9296040052db67232b0fd136446895986e25f1b4aa6a888a0ec510ad2a69bf09c65b95deba1d9b2ea6ece62d9c7 WHIRLPOOL cfe8839fd5bc6e22cfe485c63e2a7f261c8817c0d090766ae2dac6303612a977ebea87df2df473a5cebaaee9a2712b8a97aa3f6613f88732be06b7a9fa18351b EBUILD bitcoin-qt-0.8.5.ebuild 3375 SHA256 11c336e5c934ad2c470b0d10d596b93cafff16cb23f5c2cfab0776b3879c3985 SHA512 2a9fa7d5b784c4f6aefefa44f2f3309b400b9198c5870ba63aa7e0335a33f7c6afea0e122bc2df210cbc98b3c98769bf0d4ae4ddd2b619fb4104ec7b5202419f WHIRLPOOL 7d37171ba3d89b023c9e8ede7900fdfd721ad763fd115fa37ae01bb16f7d4079e0c18bf5b1750c7a79aa66381a9ceeffc5eac54e7b99f6aebb1106f3c03fb69f -MISC ChangeLog 16707 SHA256 2b522b3b9c3f4c22b3daf4f5686c5cec5a7fc34efef8709b03349ee815218a84 SHA512 1cbc53b5f74c81ddd59ea94115a0f1edd2a90d8c5a3870b796159d620a349cf066d813bfa62a0cb1d74f43bd22f3172f0edbd29f98ad2047e4b12ee61447b2ab WHIRLPOOL 310e1eee4b97dc058f8bb95c35fdcaffd685107c0731ec9e247ffe7cd46cd1cb5e528401888dae018e6f864ac3c84a43277ac04f2ea5625e82e0466601160816 +MISC ChangeLog 16864 SHA256 94529bd524c5c1411458beb09454cbf1488f08471a24cac47e17d74f7c4d711b SHA512 e325d2d49db4dbdf4b023e04f2b30ae31bff72d2994fd2470867da720ea5113c2c139031290f8301b9258eca6ae9e1eb03c755acee83632db6044c6a2f0a88a2 WHIRLPOOL cb28dde475166820a907c0d607df6b48534a694a32c21d005ad0f575bfa981f36fdd8b5b8b599ea68535a6c201bd65d80563d02205383da9ff215a17ad8ab802 MISC metadata.xml 546 SHA256 c2c08ee49a0b57a313e0406527f02004bca78bb3544b3ee9a5c4aa93970b3276 SHA512 64d314f315d8b43ce53c10f5a7ca78fa0da0c24c435f053e0fc29d8e61aff04243cf89df1d772bb2849bb5b48b8c40aeed301642f1816aa063e0269ef20da7f5 WHIRLPOOL b005a3180c42d3d9a5ffa6350511a18af6087aed38badb5ea28370b9aa06259de29c7740d8d632b41832b6224d153273a8dcddbe27d6511ccd64221a530ad156 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQIcBAEBCAAGBQJSWzzrAAoJEJOE+m71LUu61CIQAJ4llHf18z1HcbcqTitcPfwW -ofGwcSnN6AQA5uvnsiIOTU6wkO7H2rjq6mMlbVD6q2o2X+FVo9b8Tvm+O66wFmSa -UOvltPYlP/xbhN3eYah7yra0QTLF15Lo12fysHJ5uWKPhAN5bYycNScXvPmngOv9 -YCdxKBDHoL0DtlinS/1i77cRHAgXuV/hR3r/85HNkEiHK89hy/Lxc34ZRFYhJNWT -VgtrBJenNmNMMF4kaaDOIkKHti+uMarckrYV2O5spBdGbUegGb8bnCaKyJAx12Vh -i3hIXv0+9kjoiDfcI9hmyFIYLcBwA1AOfmeKi5Q093SKoTmYoEhsVxUV2SCWuaI4 -RQXc+fFRsfUShMq9wVZiINVGMA1gnq+MAYGNkj7RvH+lp4IegIqNzn4oKfS1vVxH -/RToHmsM9ce+C07zfyLRCgubrgIjCbmOnyPqmoHM+6wxVd2LgHLeDaSMc3MMp+oS -8KvqFsJf6Ct5JlkywnHYOlJHr9CwuZKWcInx4lZoBP+9G7IxuwDNVdtDuemHgi3P -2zy2xDdPwg/VQFUyLNl/3rQLwRpYysiN/pcgF0JQWIZRKpgVppGaEkfLhn/qAw08 -RFFq6TXs4fLBK1MkY6YEy2iAC0CcJ0gnuWy/wo0Kpnj66QVKerNfxmTAtbsLBRkh -TcQ1hJ9B0CnRnVRXsTfs -=Jg4q +iQIcBAEBCAAGBQJSZqlXAAoJEJOE+m71LUu6Fl4P/3hq57bD4gU//dIQp7LwnseQ +Hlla6sjiGwXVIkn0XIRzVMNc+4HyGSsQmqD+bTxh0IIBkuQByamiH9E7C2Y84Qe5 +tHQC5VbxD4hb8F1hrZlmclI/iITZ03wA5o5OyESRo604ZDB5c/Vg7I+qOgEjmRTL +zTuV9InIp5NGnpoftd89jG0S0gmhYF8f2Ok2nTcMVRdL1XKbpOkHxf5SdKnZWrvL +JSFlkgR+mEzuY463VC+WXp261UEySTsPnFohnXuK0joa1plyMA9PE810Hi6rp/aw +SzdgdGl5iHr4NGmSrg3Gw5r8TkbNim9hUrjxsrXKudd8dOloMqXUKBDN/7WMLfAE +ibcMzLKYH+Gn4nFE7xGVTjkJZ0ObITU2E3N4b4zooXfs1ZZgKdzDGovVk/y6Rl3I +A8OEQKZe/VRxQ0R/AfJnLlKgBcAsJtOs6mW5iVovM/4qDHtX4HrnZvuc0TV7uj9n +t3g4BwnyMSfBKGFK93iHwsXW5JA9yQynugwjey04KXUor7bR+m7b/wYpBWQqqrjv +My6Oe0HjRhmjcfkaHbMfZxAiYHDJDvs66StX6aVpY2gsGPEPRHm35B+12PHLH1ha +zcTaoF7+S0mCdDdLu/1oHYbb62EKxWdGQZshWr+2ww5WK7Ypde8aHqCXxbuZIwRo +blzj2Ug3V/13jdmSmpKg +=LmdI -----END PGP SIGNATURE----- diff --git a/net-p2p/bitcoin-qt/files/0.5.0.5+bip16-eligius_sendfee.patch b/net-p2p/bitcoin-qt/files/0.5.0.5+bip16-eligius_sendfee.patch deleted file mode 100644 index ada609211509..000000000000 --- a/net-p2p/bitcoin-qt/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/bitcoin-qt/files/0.8.0-sys_leveldb.patch b/net-p2p/bitcoin-qt/files/0.8.0-sys_leveldb.patch deleted file mode 100644 index 5b540c358f70..000000000000 --- a/net-p2p/bitcoin-qt/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 |