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