Sapling transaction testing

This commit is contained in:
miketout
2018-09-20 03:08:36 -07:00
parent 9feb4b9e08
commit b8deecdc09
14 changed files with 124 additions and 29 deletions

View File

@@ -1387,4 +1387,46 @@ public:
boost::optional<libzcash::SpendingKey> operator()(const libzcash::InvalidEncoding& no) const;
};
class GetPubKeyForPubKey : public boost::static_visitor<CPubKey> {
private:
const CKeyStore &keystore;
public:
GetPubKeyForPubKey(const CKeyStore &keystoreIn) : keystore(keystoreIn) {}
CPubKey operator()(const CKeyID &id) const {
return CPubKey();
}
CPubKey operator()(const CPubKey &key) const {
return key;
}
CPubKey operator()(const CScriptID &sid) const {
return CPubKey();
}
CPubKey operator()(const CNoDestination &no) const {
return CPubKey();
}
};
class AddressVisitorString : public boost::static_visitor<std::string>
{
public:
std::string operator()(const CNoDestination &dest) const { return ""; }
std::string operator()(const CKeyID &keyID) const {
return "key hash: " + keyID.ToString();
}
std::string operator()(const CPubKey &key) const {
return "public key: " + HexStr(key);
}
std::string operator()(const CScriptID &scriptID) const {
return "script hash: " + scriptID.ToString();
}
};
#endif // BITCOIN_WALLET_WALLET_H