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.
This commit is contained in:
Ben Woosley
2018-04-29 15:45:44 +00:00
parent bb24d68650
commit 3002d6cf31
6 changed files with 68 additions and 32 deletions

View File

@@ -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;