Merge pull request #1627

55a8e982 moved get_account_address_from_str_or_url from libcommon to libcryptonote_core (kenshi84)
This commit is contained in:
Riccardo Spagni 2017-02-02 18:24:08 +02:00
commit ca2e2c2453
5 changed files with 48 additions and 29 deletions

View file

@ -451,22 +451,6 @@ std::string get_account_address_as_str_from_url(const std::string& url, bool& dn
return addresses[0];
}
bool get_account_address_from_str_or_url(
cryptonote::account_public_address& address
, bool& has_payment_id
, crypto::hash8& payment_id
, bool testnet
, const std::string& str_or_url
)
{
if (cryptonote::get_account_integrated_address_from_str(address, has_payment_id, payment_id, testnet, str_or_url))
return true;
bool dnssec_valid;
std::string address_str = get_account_address_as_str_from_url(str_or_url, dnssec_valid);
return !address_str.empty() &&
cryptonote::get_account_integrated_address_from_str(address, has_payment_id, payment_id, testnet, address_str);
}
} // namespace tools::dns_utils
} // namespace tools

View file

@ -164,13 +164,6 @@ std::string address_from_txt_record(const std::string& s);
std::vector<std::string> addresses_from_url(const std::string& url, bool& dnssec_valid);
std::string get_account_address_as_str_from_url(const std::string& url, bool& dnssec_valid);
bool get_account_address_from_str_or_url(
cryptonote::account_public_address& address
, bool& has_payment_id
, crypto::hash8& payment_id
, bool testnet
, const std::string& str_or_url
);
} // namespace tools::dns_utils