12 #include <test/util/setup_common.h> 15 #include <boost/test/unit_test.hpp> 23 std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(
116 BOOST_CHECK(!w->GetDestData(dst1,
"key2", &dummy));
static std::unique_ptr< BerkeleyDatabase > CreateDummy()
Return object for accessing dummy database with no read/write capabilities.
std::shared_ptr< CWallet > m_wallet
BOOST_AUTO_TEST_CASE(write_erase_name)
std::shared_ptr< CWallet > LoadWallet(const CChainParams &chainParams, interfaces::Chain &chain, const std::string &name, bilingual_str &error, std::vector< bilingual_str > &warnings)
bool EraseDestData(const CTxDestination &address, const std::string &key)
Erase destination data tuple from wallet database.
bool WriteName(const CTxDestination &address, const std::string &strName)
DBErrors LoadWallet(CWallet *pwallet)
DBErrors
Error statuses for the wallet database.
Access to the wallet database.
NodeContext struct containing references to chain state and connection state.
bool WritePurpose(const CTxDestination &address, const std::string &purpose)
bool EraseName(const CTxDestination &address)
uint160 uint160S(const char *str)
bool ErasePurpose(const CTxDestination &address)
bool WriteDestData(const CTxDestination &address, const std::string &key, const std::string &value)
Write destination data key,value tuple to database.
#define BOOST_FIXTURE_TEST_SUITE(a, b)
Testing setup and teardown for wallet.
#define BOOST_CHECK_EQUAL(v1, v2)
const CChainParams & Params()
Return the currently selected parameters.
#define BOOST_AUTO_TEST_SUITE_END()
The WalletLocation class provides wallet information.
boost::variant< CNoDestination, PKHash, ScriptHash > CTxDestination
A txout script template with a specific destination.
#define BOOST_CHECK(expr)
std::unique_ptr< Chain > MakeChain(NodeContext &node, const CChainParams ¶ms)
Return implementation of Chain interface.