mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Add src/wallet/* code to wallet:: namespace
This commit is contained in:
parent
90fc8b089d
commit
f7086fd8ff
94 changed files with 294 additions and 75 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#include <wallet/wallet.h>
|
||||
#endif
|
||||
|
||||
using wallet::CWallet;
|
||||
|
||||
const std::string ADDRESS_BCRT1_UNSPENDABLE = "bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3xueyj";
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue