Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.h
Show First 20 Lines • Show All 612 Lines • ▼ Show 20 Lines | public: | ||||
} | } | ||||
bool HaveKey(const CKeyID &address) const override { return false; } | bool HaveKey(const CKeyID &address) const override { return false; } | ||||
bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override { | bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override { | ||||
return m_spk_man.GetKeyOrigin(keyid, info); | return m_spk_man.GetKeyOrigin(keyid, info); | ||||
} | } | ||||
}; | }; | ||||
class DescriptorScriptPubKeyMan : public ScriptPubKeyMan { | class DescriptorScriptPubKeyMan : public ScriptPubKeyMan { | ||||
private: | |||||
WalletDescriptor m_wallet_descriptor GUARDED_BY(cs_desc_man); | |||||
// Map of scripts to descriptor range index | |||||
using ScriptPubKeyMap = std::map<CScript, int32_t>; | |||||
ScriptPubKeyMap m_map_script_pub_keys GUARDED_BY(cs_desc_man); | |||||
public: | public: | ||||
using ScriptPubKeyMan::ScriptPubKeyMan; | DescriptorScriptPubKeyMan(WalletStorage &storage, | ||||
WalletDescriptor &descriptor) | |||||
: ScriptPubKeyMan(storage), m_wallet_descriptor(descriptor) {} | |||||
mutable RecursiveMutex cs_desc_man; | mutable RecursiveMutex cs_desc_man; | ||||
bool GetNewDestination(const OutputType type, CTxDestination &dest, | bool GetNewDestination(const OutputType type, CTxDestination &dest, | ||||
std::string &error) override; | std::string &error) override; | ||||
isminetype IsMine(const CScript &script) const override; | isminetype IsMine(const CScript &script) const override; | ||||
bool CheckDecryptionKey(const CKeyingMaterial &master_key, | bool CheckDecryptionKey(const CKeyingMaterial &master_key, | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |