40 const std::string
FLAGS{
"flags"};
43 const std::string
KEY{
"key"};
47 const std::string
NAME{
"name"};
50 const std::string
POOL{
"pool"};
53 const std::string
TX{
"tx"};
113 std::vector<unsigned char> vchKey;
114 vchKey.reserve(vchPubKey.
size() + vchPrivKey.size());
115 vchKey.insert(vchKey.end(), vchPubKey.
begin(), vchPubKey.
end());
116 vchKey.insert(vchKey.end(), vchPrivKey.begin(), vchPrivKey.end());
122 const std::vector<unsigned char>& vchCryptedSecret,
133 if (!
WriteIC(key, std::make_pair(vchCryptedSecret, checksum),
false)) {
135 std::vector<unsigned char> val;
136 if (!
m_batch->Read(key, val)) {
139 if (!
WriteIC(key, std::make_pair(val, checksum),
true)) {
213 return WriteIC(make_pair(key, type),
id);
219 return EraseIC(make_pair(key, type));
225 std::vector<unsigned char> key;
226 key.reserve(pubkey.
size() + privkey.size());
227 key.insert(key.end(), pubkey.
begin(), pubkey.
end());
228 key.insert(key.end(), privkey.begin(), privkey.end());
250 xpub.
Encode(ser_xpub.data());
257 xpub.
Encode(ser_xpub.data());
264 xpub.
Encode(ser_xpub.data());
276 for (
const auto& derived_xpub_pair : derived_xpub_map_pair.second) {
332 if (filter_fn && !filter_fn(strType)) {
336 std::string strAddress;
342 std::string strAddress;
350 auto fill_wtx = [&](
CWalletTx& wtx,
bool new_tx) {
359 if (wtx.GetHash() != hash)
363 if (31404 <= wtx.fTimeReceivedIsTxTime && wtx.fTimeReceivedIsTxTime <= 31703)
365 if (!ssValue.
empty())
369 std::string unused_string;
370 ssValue >> fTmp >> fUnused >> unused_string;
371 strErr =
strprintf(
"LoadWallet() upgrading tx ver=%d %d %s",
372 wtx.fTimeReceivedIsTxTime, fTmp, hash.ToString());
373 wtx.fTimeReceivedIsTxTime = fTmp;
377 strErr =
strprintf(
"LoadWallet() repairing tx ver=%d %s", wtx.fTimeReceivedIsTxTime, hash.ToString());
378 wtx.fTimeReceivedIsTxTime = 0;
383 if (wtx.nOrderPos == -1)
403 if (!vchPubKey.IsValid())
405 strErr =
"Error reading wallet database: CPubKey corrupt";
424 catch (
const std::ios_base::failure&) {}
426 bool fSkipCheck =
false;
431 std::vector<unsigned char> vchKey;
432 vchKey.reserve(vchPubKey.size() + pkey.size());
433 vchKey.insert(vchKey.end(), vchPubKey.begin(), vchPubKey.end());
434 vchKey.insert(vchKey.end(), pkey.begin(), pkey.end());
436 if (
Hash(vchKey) != hash)
438 strErr =
"Error reading wallet database: CPubKey/CPrivKey corrupt";
445 if (!key.
Load(pkey, vchPubKey, fSkipCheck))
447 strErr =
"Error reading wallet database: CPrivKey corrupt";
452 strErr =
"Error reading wallet database: LegacyScriptPubKeyMan::LoadKey failed";
460 ssValue >> kMasterKey;
463 strErr =
strprintf(
"Error reading wallet database: duplicate CMasterKey id %u", nID);
472 if (!vchPubKey.IsValid())
474 strErr =
"Error reading wallet database: CPubKey corrupt";
477 std::vector<unsigned char> vchPrivKey;
478 ssValue >> vchPrivKey;
481 bool checksum_valid =
false;
482 if (!ssValue.
eof()) {
485 if ((checksum_valid =
Hash(vchPrivKey) != checksum)) {
486 strErr =
"Error reading wallet database: Encrypted key corrupt";
495 strErr =
"Error reading wallet database: LegacyScriptPubKeyMan::LoadCryptedKey failed";
512 bool internal =
false;
514 if (keyMeta.hdKeypath !=
"s" && keyMeta.hdKeypath !=
"m") {
515 std::vector<uint32_t> path;
516 if (keyMeta.has_key_origin) {
518 path = keyMeta.key_origin.path;
522 strErr =
"Error reading wallet database: keymeta with invalid HD keypath";
531 if (path.size() != 3) {
532 strErr =
"Error reading wallet database: keymeta found with unexpected path";
535 if (path[0] != 0x80000000) {
536 strErr =
strprintf(
"Unexpected path index of 0x%08x (expected 0x80000000) for the element at index 0", path[0]);
539 if (path[1] != 0x80000000 && path[1] != (1 | 0x80000000)) {
540 strErr =
strprintf(
"Unexpected path index of 0x%08x (expected 0x80000000 or 0x80000001) for the element at index 1", path[1]);
543 if ((path[2] & 0x80000000) == 0) {
544 strErr =
strprintf(
"Unexpected path index of 0x%08x (expected to be greater than or equal to 0x80000000)", path[2]);
547 internal = path[1] == (1 | 0x80000000);
548 index = path[2] & ~0x80000000;
553 CHDChain& chain = ins.first->second;
557 chain.
seed_id = keyMeta.hd_seed_id;
577 ssValue >> vchPubKey;
578 if (!vchPubKey.IsValid()) {
579 strErr =
"Error reading wallet database: Default Key corrupt";
596 strErr =
"Error reading wallet database: LegacyScriptPubKeyMan::LoadCScript failed";
600 ssValue >> pwallet->nOrderPosNext;
602 std::string strAddress, strKey, strValue;
612 strErr =
"Found unsupported 'wkey' record, try loading with version 0.18";
622 if (spk_mans.count(static_cast<OutputType>(type)) > 0) {
623 strErr =
"Multiple ScriptPubKeyMans specified for a single type";
633 }
catch (
const std::ios_base::failure& e) {
645 uint32_t key_exp_index;
648 ssKey >> key_exp_index;
661 xpub.
Decode(ser_xpub.data());
669 uint32_t key_exp_index;
671 ssKey >> key_exp_index;
676 xpub.
Decode(ser_xpub.data());
683 if (!pubkey.IsValid())
685 strErr =
"Error reading wallet database: CPubKey corrupt";
697 std::vector<unsigned char> to_hash;
698 to_hash.reserve(pubkey.size() + pkey.size());
699 to_hash.insert(to_hash.end(), pubkey.begin(), pubkey.end());
700 to_hash.insert(to_hash.end(), pkey.begin(), pkey.end());
702 if (
Hash(to_hash) != hash)
704 strErr =
"Error reading wallet database: CPubKey/CPrivKey corrupt";
708 if (!key.
Load(pkey, pubkey,
true))
710 strErr =
"Error reading wallet database: CPrivKey corrupt";
713 wss.
m_descriptor_keys.insert(std::make_pair(std::make_pair(desc_id, pubkey.GetID()), key));
719 if (!pubkey.IsValid())
721 strErr =
"Error reading wallet database: CPubKey corrupt";
724 std::vector<unsigned char> privkey;
728 wss.
m_descriptor_crypt_keys.insert(std::make_pair(std::make_pair(desc_id, pubkey.GetID()), std::make_pair(pubkey, privkey)));
742 }
catch (
const std::exception& e) {
743 if (strErr.empty()) {
748 if (strErr.empty()) {
749 strErr =
"Caught unknown exception in ReadKeyValue";
760 return ReadKeyValue(pwallet, ssKey, ssValue, dummy_wss, strType, strErr, filter_fn);
772 bool fNoncriticalErrors =
false;
773 bool rescan_required =
false;
796 pwallet->
WalletLogPrintf(
"Error reading wallet database: Unknown non-tolerable wallet flags found\n");
801 #ifndef ENABLE_EXTERNAL_SIGNER 803 pwallet->
WalletLogPrintf(
"Error: External signer wallet being loaded without external signer support compiled\n");
821 bool ret =
m_batch->ReadAtCursor(ssKey, ssValue, complete);
828 pwallet->
WalletLogPrintf(
"Error reading next record from wallet database\n");
833 std::string strType, strErr;
834 if (!
ReadKeyValue(pwallet, ssKey, ssValue, wss, strType, strErr))
844 pwallet->
WalletLogPrintf(
"Error: Corrupt transaction found. This can be fixed by removing transactions from wallet and rescanning.\n");
849 strErr =
strprintf(
"Error: Unrecognized descriptor found in wallet %s. ", pwallet->
GetName());
850 strErr += (last_client >
CLIENT_VERSION) ?
"The wallet might had been created on a newer version. " :
851 "The database might be corrupted or the software version is not compatible with one of your wallet descriptors. ";
852 strErr +=
"Please try running the latest software version";
857 fNoncriticalErrors =
true;
860 rescan_required =
true;
893 ((
DescriptorScriptPubKeyMan*)spk_man)->AddCryptedKey(desc_key_pair.first.second, desc_key_pair.second.first, desc_key_pair.second.second);
907 pwallet->
WalletLogPrintf(
"Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total. Unknown wallet records: %u\n",
914 LOCK(spk_man->cs_KeyStore);
915 spk_man->UpdateTimeFirstKey(1);
920 WriteTx(pwallet->mapWallet.at(hash));
923 if (wss.
fIsEncrypted && (last_client == 40000 || last_client == 50000))
952 pwallet->
WalletLogPrintf(
"Inactive HD Chains found but no Legacy ScriptPubKeyMan\n");
979 LogPrintf(
"Error getting wallet database cursor\n");
989 bool ret =
m_batch->ReadAtCursor(ssKey, ssValue, complete);
994 LogPrintf(
"Error reading next record from wallet database\n");
1003 vTxHash.push_back(hash);
1005 ssValue >> vWtx.back();
1019 std::vector<uint256> vTxHash;
1020 std::list<CWalletTx> vWtx;
1026 std::sort(vTxHash.begin(), vTxHash.end());
1027 std::sort(vTxHashIn.begin(), vTxHashIn.end());
1030 bool delerror =
false;
1031 std::vector<uint256>::iterator it = vTxHashIn.begin();
1032 for (
const uint256& hash : vTxHash) {
1033 while (it < vTxHashIn.end() && (*it) < hash) {
1036 if (it == vTxHashIn.end()) {
1039 else if ((*it) == hash) {
1041 LogPrint(
BCLog::WALLETDB,
"Transaction was found for deletion but returned database error: %s\n", hash.GetHex());
1044 vTxHashOut.push_back(hash);
1056 static std::atomic<bool> fOneThread(
false);
1057 if (fOneThread.exchange(
true)) {
1117 bool ret =
m_batch->ReadAtCursor(key, value, complete);
1133 if (types.count(type) > 0) {
1160 exists = fs::symlink_status(path).type() != fs::file_type::not_found;
1161 }
catch (
const fs::filesystem_error& e) {
1167 std::optional<DatabaseFormat>
format;
1238 return std::make_unique<DummyDatabase>();
1245 std::optional<DatabaseFormat>
format;
1258 return std::make_unique<SQLiteDatabase>(
":memory:",
"", options,
true);
1264 return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(),
"", options);
std::unique_ptr< WalletDatabase > MakeDatabase(const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
const std::string MASTER_KEY
Private key encryption is done based on a CMasterKey, which holds a salt and random encryption key...
std::optional< DatabaseFormat > require_format
const std::string BESTBLOCK_NOMERKLE
const std::string SETTINGS
const std::string CRYPTED_KEY
std::map< std::pair< uint256, CKeyID >, std::pair< CPubKey, std::vector< unsigned char > > > m_descriptor_crypt_keys
const std::unordered_map< uint32_t, ExtPubKeyMap > GetCachedDerivedExtPubKeys() const
Retrieve all cached derived xpubs.
const std::string HDCHAIN
const CHDChain & GetHDChain() const
#define LogPrint(category,...)
const std::string ACENTRY
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
const std::string VERSION
bool WriteHDChain(const CHDChain &chain)
write the hdchain model (external chain child index counter)
bool LoadWatchOnly(const CScript &dest)
Adds a watch-only address to the store, without saving it to disk (used by LoadWallet) ...
void UpgradeDescriptorCache() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
Upgrade DescriptorCaches.
bool LoadToWallet(const uint256 &hash, const UpdateWalletTxFn &fill_wtx) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
const std::string DESTDATA
std::unique_ptr< SQLiteDatabase > MakeSQLiteDatabase(const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
void LoadKeyMetadata(const CKeyID &keyID, const CKeyMetadata &metadata)
Load metadata (used by LoadWallet)
const std::string WALLETDESCRIPTORCKEY
bool WriteDescriptorCacheItems(const uint256 &desc_id, const DescriptorCache &cache)
DBErrors FindWalletTx(std::vector< uint256 > &vTxHash, std::list< CWalletTx > &vWtx)
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
bool EraseDestData(const std::string &address, const std::string &key)
Erase destination data tuple from wallet database.
const std::string BESTBLOCK
const std::string & GetName() const
Get a name for this wallet for logging/debugging purposes.
bool WriteCryptedDescriptorKey(const uint256 &desc_id, const CPubKey &pubkey, const std::vector< unsigned char > &secret)
uint32_t nExternalChainCounter
bool IsLegacy() const
Determine if we are a legacy wallet.
const std::string WALLETDESCRIPTOR
bool WriteMasterKey(unsigned int nID, const CMasterKey &kMasterKey)
std::map< OutputType, uint256 > m_active_internal_spks
MasterKeyMap mapMasterKeys
bool TxnAbort()
Abort current transaction.
bool LoadCScript(const CScript &redeemScript)
Adds a CScript to the store.
RecursiveMutex cs_wallet
Main wallet lock.
void LoadScriptMetadata(const CScriptID &script_id, const CKeyMetadata &metadata)
bool EraseWatchOnly(const CScript &script)
State of transaction not confirmed or conflicting with a known block and not in the mempool...
bool WriteCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, const CKeyMetadata &keyMeta)
bool WriteLockedUTXO(const COutPoint &output)
Double ended buffer combining vector and stream-like interfaces.
bool WriteMinVersion(int nVersion)
bool WritePool(int64_t nPool, const CKeyPool &keypool)
ScriptPubKeyMan * GetScriptPubKeyMan(const OutputType &type, bool internal) const
Get the ScriptPubKeyMan for the given OutputType and internal/external chain.
A key from a CWallet's keypool.
const std::string CSCRIPT
bool WriteOrderPosNext(int64_t nOrderPosNext)
bool ReadBestBlock(CBlockLocator &locator)
const std::string PURPOSE
std::atomic< unsigned int > nUpdateCounter
const std::string MINVERSION
LegacyScriptPubKeyMan * GetLegacyScriptPubKeyMan() const
Get the LegacyScriptPubKeyMan which is used for all types, internal, and external.
std::unique_ptr< DatabaseBatch > m_batch
bool WriteDescriptor(const uint256 &desc_id, const WalletDescriptor &descriptor)
bool WriteDescriptorKey(const uint256 &desc_id, const CPubKey &pubkey, const CPrivKey &privkey)
const std::string WALLETDESCRIPTORKEY
const unsigned char * begin() const
bool LoadMinVersion(int nVersion) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
unsigned int m_unknown_records
const std::unordered_set< std::string > LEGACY_TYPES
bool WriteKeyMetadata(const CKeyMetadata &meta, const CPubKey &pubkey, const bool overwrite)
fs::path SQLiteDataFile(const fs::path &path)
void MaybeCompactWalletDB(WalletContext &context)
Compacts BDB state so that wallet.dat is self-contained (if there are changes)
bool LockCoin(const COutPoint &output, WalletBatch *batch=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
bool WriteBestBlock(const CBlockLocator &locator)
const ExtPubKeyMap GetCachedLastHardenedExtPubKeys() const
Retrieve all cached last hardened xpubs.
std::unique_ptr< BerkeleyDatabase > MakeBerkeleyDatabase(const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
Return object giving access to Berkeley database at specified path.
int64_t nLastWalletUpdate
std::vector< unsigned char, secure_allocator< unsigned char > > CPrivKey
CPrivKey is a serialized private key, with all parameters included (SIZE bytes)
void LoadDescriptorScriptPubKeyMan(uint256 id, WalletDescriptor &desc)
Instantiate a descriptor ScriptPubKeyMan from the WalletDescriptor and load it.
A transaction with a bunch of additional info that only the owner cares about.
const std::string WATCHMETA
bool EraseName(const std::string &strAddress)
Indicates that the wallet needs an external signer.
DBErrors LoadWallet(CWallet *pwallet)
CWalletScanState()=default
void Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const
bool WriteWatchOnly(const CScript &script, const CKeyMetadata &keymeta)
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE])
bool TxnCommit()
Commit current transaction.
static std::string PathToString(const path &path)
Convert path object to a byte string.
bool IsBDBFile(const fs::path &path)
bool WriteActiveScriptPubKeyMan(uint8_t type, const uint256 &id, bool internal)
const unsigned char * end() const
bool ReadPool(int64_t nPool, CKeyPool &keypool)
bool WriteDescriptorDerivedCache(const CExtPubKey &xpub, const uint256 &desc_id, uint32_t key_exp_index, uint32_t der_index)
std::unique_ptr< WalletDatabase > CreateMockWalletDatabase(DatabaseOptions &options)
Return object for accessing temporary in-memory database.
void LoadHDChain(const CHDChain &chain)
Load a HD chain model (used by LoadWallet)
bool WriteTx(const CWalletTx &wtx)
unsigned int nLastFlushed
std::function< bool(const std::string &)> KeyFilterFn
Callback for filtering key types to deserialize in ReadKeyValue.
An encapsulated public key.
bool LoadKey(const CKey &key, const CPubKey &pubkey)
Adds a key to the store, without saving it to disk (used by LoadWallet)
std::map< uint256, DescriptorCache > m_descriptor_caches
bool EraseRecords(const std::unordered_set< std::string > &types)
Delete records of the given types.
static bool ReadKeyValue(CWallet *pwallet, CDataStream &ssKey, CDataStream &ssValue, CWalletScanState &wss, std::string &strType, std::string &strErr, const KeyFilterFn &filter_fn=nullptr) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
uint32_t nInternalChainCounter
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
bool WriteCScript(const uint160 &hash, const CScript &redeemScript)
bool WriteWalletFlags(const uint64_t flags)
unsigned int size() const
Simple read-only vector-like interface to the pubkey data.
std::vector< uint256 > vWalletUpgrade
std::map< OutputType, uint256 > m_active_external_spks
std::vector< uint256 > vHave
bool IsWalletFlagSet(uint64_t flag) const override
check if a certain wallet flag is set
An outpoint - a combination of a transaction hash and an index n into its vout.
bool WriteDestData(const std::string &address, const std::string &key, const std::string &value)
Write destination data key,value tuple to database.
virtual bool PeriodicFlush()=0
bool ErasePurpose(const std::string &strAddress)
bool ErasePool(int64_t nPool)
bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, bool checksum_valid)
Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) ...
Descriptor with some wallet metadata.
const std::string ACTIVEINTERNALSPK
const std::string KEYMETA
bool WriteDescriptorParentCache(const CExtPubKey &xpub, const uint256 &desc_id, uint32_t key_exp_index)
std::string get_filesystem_error_message(const fs::filesystem_error &e)
const std::string WALLETDESCRIPTORCACHE
bool EraseIC(const K &key)
#define EXCLUSIVE_LOCKS_REQUIRED(...)
std::vector< std::shared_ptr< CWallet > > GetWallets(WalletContext &context)
const std::string ACTIVEEXTERNALSPK
bool ParseHDKeypath(const std::string &keypath_str, std::vector< uint32_t > &keypath)
Parse an HD keypaths like "m/7/0'/2000".
Cache for single descriptor's derived extended pubkeys.
Serialized script, used inside transaction inputs and outputs.
void LoadActiveScriptPubKeyMan(uint256 id, OutputType type, bool internal)
Loads an active ScriptPubKeyMan for the specified type and internal.
const unsigned int BIP32_EXTKEY_SIZE
fs::path BDBDataFile(const fs::path &wallet_path)
const uint256 & GetHash() const
void LoadDestData(const CTxDestination &dest, const std::string &key, const std::string &value) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
Adds a destination data tuple to the store, without saving it to disk.
bool TxnBegin()
Begin a new transaction.
bool EraseTx(uint256 hash)
bool WriteKey(const CPubKey &vchPubKey, const CPrivKey &vchPrivKey, const CKeyMetadata &keyMeta)
WalletContext struct containing references to state shared between CWallet instances, like the reference to the chain interface, and the list of opened wallets.
DBErrors ReorderTransactions()
const std::string LOCKED_UTXO
constexpr auto MakeUCharSpan(V &&v) -> decltype(UCharSpanCast(Span
Like the Span constructor, but for (const) unsigned char member types only.
DBErrors
Error statuses for the wallet database.
bool LoadWalletFlags(uint64_t flags)
Loads the flags into the wallet.
bool IsSQLiteFile(const fs::path &path)
static const int VERSION_HD_BASE
static bool IsKeyType(const std::string &strType)
void AddInactiveHDChain(const CHDChain &chain)
A reference to a CScript: the Hash160 of its serialization (see script.h)
const std::string WALLETDESCRIPTORLHCACHE
bool WriteName(const std::string &strAddress, const std::string &strName)
void UpgradeKeyMetadata() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
Upgrade stored CKeyMetadata objects to store key origin info as KeyOriginInfo.
int GetVersion() const
get the current wallet format (the oldest client version guaranteed to understand this wallet) ...
bool WriteIC(const K &key, const T &value, bool fOverwrite=true)
const std::string DEFAULTKEY
An encapsulated private key.
uint256 Hash(const T &in1)
Compute the 256-bit hash of an object.
void WalletLogPrintf(std::string fmt, Params... parameters) const
Prepends the wallet name in logging output to ease debugging in multi-wallet use cases.
bool EraseLockedUTXO(const COutPoint &output)
static bool exists(const path &p)
CTxDestination DecodeDestination(const std::string &str, std::string &error_msg, std::vector< int > *error_locations)
bool EraseActiveScriptPubKeyMan(uint8_t type, bool internal)
const std::string ORDERPOSNEXT
const ExtPubKeyMap GetCachedParentExtPubKeys() const
Retrieve all cached parent xpubs.
unsigned int nMasterKeyMaxID
int64_t GetTime()
DEPRECATED, see GetTime.
DBErrors ZapSelectTx(std::vector< uint256 > &vHashIn, std::vector< uint256 > &vHashOut)
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
static const int CLIENT_VERSION
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
bool WritePurpose(const std::string &strAddress, const std::string &purpose)
CKeyID seed_id
seed hash160
bool error(const char *fmt, const Args &... args)
An instance of this class represents one database.
const std::string OLD_KEY
void LoadKeyPool(int64_t nIndex, const CKeyPool &keypool)
Load a keypool entry.
std::map< uint160, CHDChain > m_hd_chains
std::map< std::pair< uint256, CKeyID >, CKey > m_descriptor_keys
bool WriteDescriptorLastHardenedCache(const CExtPubKey &xpub, const uint256 &desc_id, uint32_t key_exp_index)
bool Load(const CPrivKey &privkey, const CPubKey &vchPubKey, bool fSkipCheck)
Load private key and check that public key matches.
LegacyScriptPubKeyMan * GetOrCreateLegacyScriptPubKeyMan()
std::unique_ptr< WalletDatabase > CreateDummyWalletDatabase()
Return object for accessing dummy database with no read/write capabilities.
static const int VERSION_HD_CHAIN_SPLIT