Merge pull request #11073

5cc215d wallet: respect --no-dns for OpenAlias (Samy)

ACKs: jpk68, SNeedlewoods, selsta
This commit is contained in:
tobtoht
2026-08-16 15:20:41 +00:00
6 changed files with 55 additions and 17 deletions
@@ -236,9 +236,22 @@ namespace cryptonote {
, const std::string& str_or_url
, std::function<std::string(const std::string&, const std::vector<std::string>&, bool)> dns_confirm
)
{
return get_account_address_from_str_or_url(info, nettype, str_or_url, true, dns_confirm);
}
//--------------------------------------------------------------------------------
bool get_account_address_from_str_or_url(
address_parse_info& info
, network_type nettype
, const std::string& str_or_url
, bool allow_dns
, std::function<std::string(const std::string&, const std::vector<std::string>&, bool)> dns_confirm
)
{
if (get_account_address_from_str(info, nettype, str_or_url))
return true;
if (!allow_dns)
return false;
bool dnssec_valid;
std::string address_str = tools::dns_utils::get_account_address_as_str_from_url(str_or_url, dnssec_valid, dns_confirm);
return !address_str.empty() &&
@@ -90,6 +90,14 @@ namespace cryptonote {
, std::function<std::string(const std::string&, const std::vector<std::string>&, bool)> dns_confirm = return_first_address
);
bool get_account_address_from_str_or_url(
address_parse_info& info
, network_type nettype
, const std::string& str_or_url
, bool allow_dns
, std::function<std::string(const std::string&, const std::vector<std::string>&, bool)> dns_confirm = return_first_address
);
bool is_coinbase(const transaction_prefix& tx);
bool operator ==(const cryptonote::transaction& a, const cryptonote::transaction& b);