mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #321
bbc5475
Fix DNS checkpoint consensus code (moneromooo-monero)
This commit is contained in:
commit
2d9d6c7621
1 changed files with 6 additions and 9 deletions
|
@ -177,24 +177,21 @@ bool load_checkpoints_from_dns(cryptonote::checkpoints& checkpoints, bool testne
|
||||||
records[cur_index] = tools::DNSResolver::instance().get_txt_record(url, avail, valid);
|
records[cur_index] = tools::DNSResolver::instance().get_txt_record(url, avail, valid);
|
||||||
if (!avail)
|
if (!avail)
|
||||||
{
|
{
|
||||||
|
records[cur_index].clear();
|
||||||
LOG_PRINT_L2("DNSSEC not available for checkpoint update at URL: " << url << ", skipping.");
|
LOG_PRINT_L2("DNSSEC not available for checkpoint update at URL: " << url << ", skipping.");
|
||||||
}
|
}
|
||||||
if (!valid)
|
if (!valid)
|
||||||
{
|
{
|
||||||
|
records[cur_index].clear();
|
||||||
LOG_PRINT_L2("DNSSEC validation failed for checkpoint update at URL: " << url << ", skipping.");
|
LOG_PRINT_L2("DNSSEC validation failed for checkpoint update at URL: " << url << ", skipping.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (records[cur_index].size() == 0 || !avail || !valid)
|
cur_index++;
|
||||||
|
if (cur_index == dns_urls.size())
|
||||||
{
|
{
|
||||||
cur_index++;
|
cur_index = 0;
|
||||||
if (cur_index == dns_urls.size())
|
|
||||||
{
|
|
||||||
cur_index = 0;
|
|
||||||
}
|
|
||||||
records[cur_index].clear();
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
break;
|
records[cur_index].clear();
|
||||||
} while (cur_index != first_index);
|
} while (cur_index != first_index);
|
||||||
|
|
||||||
size_t num_valid_records = 0;
|
size_t num_valid_records = 0;
|
||||||
|
|
Loading…
Reference in a new issue