mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Allow name@domain.tld for OpenAlias lookups
Based on tewinget's update. Make OpenAlias address format independent of existing DNS functions. Add tests. Test: make debug-test cd build/debug/tests/unit_tests # test that regular DNS functions work, including IPv4 lookups. # also test function that converts OpenAlias address format make && ./unit_tests --gtest_filter=DNSResolver* # test that OpenAlias addresses like donate@getmonero.org work from # wallet tools make && ./unit_tests --gtest_filter=AddressFromURL.Success
This commit is contained in:
parent
a0fe18f63a
commit
fee8424938
5 changed files with 43 additions and 1 deletions
|
@ -148,4 +148,12 @@ TEST(DNSResolver, GetTXTRecord)
|
|||
{
|
||||
std::cout << "TXT record for donate.getmonero.org: " << rec << std::endl;
|
||||
}
|
||||
|
||||
// replace first @ with .
|
||||
std::string addr = tools::DNSResolver::instance().get_dns_format_from_oa_address("donate@getmonero.org");
|
||||
EXPECT_STREQ("donate.getmonero.org", addr.c_str());
|
||||
|
||||
// no change
|
||||
addr = tools::DNSResolver::instance().get_dns_format_from_oa_address("donate.getmonero.org");
|
||||
EXPECT_STREQ("donate.getmonero.org", addr.c_str());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue