aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-04-29 15:45:44 +0000
committerBen Woosley <ben.woosley@gmail.com>2018-11-13 00:04:13 -0500
commit3002d6cf31821622e9f21d51e536cafc5cfb10ae (patch)
treea0831d207b5ca61d08285ac71212929817e5d8d4 /src/test
parentbb24d686500375564a2137f0940b329b6905bce6 (diff)
Return a status enum from ScanForWalletTransactions
Return the failed block as an out var. This clarifies the outcome as the prior return value could be null due to user abort or failure.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_bitcoin.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h
index 3872767133..182571b004 100644
--- a/src/test/test_bitcoin.h
+++ b/src/test/test_bitcoin.h
@@ -15,9 +15,17 @@
#include <txmempool.h>
#include <memory>
+#include <type_traits>
#include <boost/thread.hpp>
+// Enable BOOST_CHECK_EQUAL for enum class types
+template <typename T>
+std::ostream& operator<<(typename std::enable_if<std::is_enum<T>::value, std::ostream>::type& stream, const T& e)
+{
+ return stream << static_cast<typename std::underlying_type<T>::type>(e);
+}
+
extern uint256 insecure_rand_seed;
extern FastRandomContext insecure_rand_ctx;