Make it compile and apply some fixes

This commit is contained in:
lateminer
2018-10-14 22:49:30 +03:00
parent af1585d232
commit eea97b0e37
6 changed files with 34 additions and 24 deletions

View File

@@ -255,6 +255,23 @@ CTxDestination DecodeDestination(const std::string &str, const CChainParams &par
}
} // namespace
namespace
{
class CBitcoinAddressVisitor : public boost::static_visitor<bool>
{
private:
CBitcoinAddress* addr;
public:
CBitcoinAddressVisitor(CBitcoinAddress* addrIn) : addr(addrIn) {}
bool operator()(const CKeyID& id) const { return addr->Set(id); }
bool operator()(const CScriptID& id) const { return addr->Set(id); }
bool operator()(const CNoDestination& no) const { return false; }
};
} // anon namespace
bool CBitcoinAddress::Set(const CKeyID& id)
{
SetData(Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS), &id, 20);