8 #include <boost/test/unit_test.hpp> 21 std::string
ToString()
const override {
return desc; }
24 bool IsRange()
const override {
return false; }
40 std::string unknown_desc =
"trx(tpubD6NzVbkrYhZ4Y4S7m6Y5s9GD8FqEMBy56AGphZXuagajudVZEnYyBahZMgHNCTJc2at82YX6s8JiL1Lohu5A3v1Ur76qguNH4QVQ7qYrBQx/86'/1'/0'/0/*)#8pn8tzdt";
41 WalletDescriptor wallet_descriptor(std::make_shared<DummyDescriptor>(unknown_desc), 0, 0, 0, 0);
bool Expand(int pos, const SigningProvider &provider, std::vector< CScript > &output_scripts, FlatSigningProvider &out, DescriptorCache *write_cache=nullptr) const override
Expand a descriptor at a specified position.
std::unique_ptr< interfaces::Chain > chain
bool ToNormalizedString(const SigningProvider &provider, std::string &out, const DescriptorCache *cache=nullptr) const override
Convert the descriptor to a normalized string.
bool IsSolvable() const override
Whether this descriptor has all information about signing ignoring lack of private keys...
std::string ToString() const override
Convert the descriptor back to a string, undoing parsing.
Access to the wallet database.
bool WriteDescriptor(const uint256 &desc_id, const WalletDescriptor &descriptor)
bool ExpandFromCache(int pos, const DescriptorCache &read_cache, std::vector< CScript > &output_scripts, FlatSigningProvider &out) const override
Expand a descriptor at a specified position using cached expansion data.
bool WriteActiveScriptPubKeyMan(uint8_t type, const uint256 &id, bool internal)
std::unique_ptr< WalletDatabase > CreateMockWalletDatabase(DatabaseOptions &options)
Return object for accessing temporary in-memory database.
BOOST_FIXTURE_TEST_CASE(BasicOutputTypesTest, AvailableCoinsTestingSetup)
BOOST_AUTO_TEST_SUITE_END()
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
bool IsSingleType() const override
Whether this descriptor will return one scriptPubKey or multiple (aka is or is not combo) ...
Descriptor with some wallet metadata.
An interface to be implemented by keystores that support signing.
#define BOOST_CHECK_EQUAL(v1, v2)
Cache for single descriptor's derived extended pubkeys.
DummyDescriptor(const std::string &descriptor)
bool IsRange() const override
Whether the expansion of this descriptor depends on the position.
bool ToPrivateString(const SigningProvider &provider, std::string &out) const override
Convert the descriptor to a private string.
std::optional< OutputType > GetOutputType() const override
BOOST_AUTO_TEST_SUITE(cuckoocache_tests)
Test Suite for CuckooCache.
std::shared_ptr< CWallet > wallet
void ExpandPrivate(int pos, const SigningProvider &provider, FlatSigningProvider &out) const override
Expand the private key for a descriptor at a specified position, if possible.
Testing setup that configures a complete environment.
Interface for parsed descriptor objects.
#define BOOST_CHECK(expr)