diff options
-rw-r--r-- | configure.ac | 13 | ||||
-rwxr-xr-x | qa/rpc-tests/mempool_packages.py | 9 | ||||
-rw-r--r-- | src/wallet/walletdb.cpp | 5 |
3 files changed, 21 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 0342777fb9..3e5303647a 100644 --- a/configure.ac +++ b/configure.ac @@ -619,6 +619,17 @@ if test x$use_boost = xyes; then BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB" + +dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums +dnl using c++98 constructs. Unfortunately, this implementation detail leaked into +dnl the abi. This was fixed in 1.57. + +dnl When building against that installed version using c++11, the headers pick up +dnl on the native c++11 scoped enum support and enable it, however it will fail to +dnl link. This can be worked around by disabling c++11 scoped enums if linking will +dnl fail. +dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51. + TEMP_LIBS="$LIBS" LIBS="$BOOST_LIBS $LIBS" TEMP_CPPFLAGS="$CPPFLAGS" @@ -640,7 +651,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ choke; #endif ]])], - [AC_MSG_RESULT(mismatched); AC_DEFINE(FORCE_BOOST_EMULATED_SCOPED_ENUMS, 1, [Define this symbol if boost scoped enums are emulated])], [AC_MSG_RESULT(ok)]) + [AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)]) LIBS="$TEMP_LIBS" CPPFLAGS="$TEMP_CPPFLAGS" diff --git a/qa/rpc-tests/mempool_packages.py b/qa/rpc-tests/mempool_packages.py index 063308d394..47c1028b9f 100755 --- a/qa/rpc-tests/mempool_packages.py +++ b/qa/rpc-tests/mempool_packages.py @@ -87,9 +87,18 @@ class MempoolPackagesTest(BitcoinTestFramework): print "too-long-ancestor-chain successfully rejected" # Check that prioritising a tx before it's added to the mempool works + # First clear the mempool by mining a block. self.nodes[0].generate(1) + sync_blocks(self.nodes) + assert_equal(len(self.nodes[0].getrawmempool()), 0) + # Prioritise a transaction that has been mined, then add it back to the + # mempool by using invalidateblock. self.nodes[0].prioritisetransaction(chain[-1], 0, 2000) self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + # Keep node1's tip synced with node0 + self.nodes[1].invalidateblock(self.nodes[1].getbestblockhash()) + + # Now check that the transaction is in the mempool, with the right modified fee mempool = self.nodes[0].getrawmempool(True) descendant_fees = 0 diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 5266946ca0..67511976df 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -15,11 +15,6 @@ #include "utiltime.h" #include "wallet/wallet.h" -#if defined(FORCE_BOOST_EMULATED_SCOPED_ENUMS) -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_CXX11_SCOPED_ENUMS -#endif - #include <boost/version.hpp> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> |