diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2021-11-12 11:13:29 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2022-01-06 22:14:16 -0500 |
commit | f7086fd8ff084ab0dd656d75b7485e59263bdfd8 (patch) | |
tree | 8d61564498f3015224618b9543ae8e608282f9cb /src/test/util | |
parent | 90fc8b089d591cabff60ee829a33f96c37fd27ba (diff) |
Add src/wallet/* code to wallet:: namespace
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/setup_common.h | 2 | ||||
-rw-r--r-- | src/test/util/wallet.cpp | 2 | ||||
-rw-r--r-- | src/test/util/wallet.h | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h index 979eafc5a3..58ffd77995 100644 --- a/src/test/util/setup_common.h +++ b/src/test/util/setup_common.h @@ -26,11 +26,13 @@ extern const std::function<void(const std::string&)> G_TEST_LOG_FUN; // Enable BOOST_CHECK_EQUAL for enum class types +namespace std { 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); } +} // namespace std /** * This global and the helpers that use it are not thread-safe. diff --git a/src/test/util/wallet.cpp b/src/test/util/wallet.cpp index 4273dfe719..52aaeabccf 100644 --- a/src/test/util/wallet.cpp +++ b/src/test/util/wallet.cpp @@ -12,6 +12,8 @@ #include <wallet/wallet.h> #endif +using wallet::CWallet; + const std::string ADDRESS_BCRT1_UNSPENDABLE = "bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3xueyj"; #ifdef ENABLE_WALLET diff --git a/src/test/util/wallet.h b/src/test/util/wallet.h index 565ef1756a..31281bf70e 100644 --- a/src/test/util/wallet.h +++ b/src/test/util/wallet.h @@ -7,7 +7,9 @@ #include <string> +namespace wallet { class CWallet; +} // namespace wallet // Constants // @@ -16,9 +18,9 @@ extern const std::string ADDRESS_BCRT1_UNSPENDABLE; // RPC-like // /** Import the address to the wallet */ -void importaddress(CWallet& wallet, const std::string& address); +void importaddress(wallet::CWallet& wallet, const std::string& address); /** Returns a new address from the wallet */ -std::string getnewaddress(CWallet& w); +std::string getnewaddress(wallet::CWallet& w); #endif // BITCOIN_TEST_UTIL_WALLET_H |