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

@@ -213,6 +213,7 @@ public:
CBitcoinAddressVisitor(CBitcoinAddress* addrIn) : addr(addrIn) {}
bool operator()(const CKeyID& id) const { return addr->Set(id); }
bool operator()(const CPubKey& key) const { return addr->Set(key); }
bool operator()(const CScriptID& id) const { return addr->Set(id); }
bool operator()(const CNoDestination& no) const { return false; }
};
@@ -225,6 +226,13 @@ bool CBitcoinAddress::Set(const CKeyID& id)
return true;
}
bool CBitcoinAddress::Set(const CPubKey& key)
{
CKeyID id = key.GetID();
SetData(Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS), &id, 20);
return true;
}
bool CBitcoinAddress::Set(const CScriptID& id)
{
SetData(Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS), &id, 20);