diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-03-24 08:50:08 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-03-24 08:53:05 +0200 |
commit | d7286395c97afd9d33d6170c1cf24f1e38140b37 (patch) | |
tree | 5513e1477d68755a44e0b0c7d34542b1c75eb99d /src/cryptonote_core/checkpoints_create.cpp | |
parent | updated gtest to latest (diff) | |
parent | Merge upstream to daemonize changes (diff) | |
download | monero-d7286395c97afd9d33d6170c1cf24f1e38140b37.tar.xz |
Merge pull request #243
51e3579 Fixed bug in static linking boost on MINGW (Thomas Winget)
f78bb00 Hopefully fixes build on Windows for real this time (Thomas Winget)
2b0583b Hopefully fixes build on Windows (Thomas Winget)
9dab105 DNS checkpoint loading for testnet should now be correct (Thomas Winget)
52f9629 sending commands to forked daemon works on testnet now (Thomas Winget)
76289d0 Fix tests building -- function signatures changed (Thomas Winget)
db53e19 revert stop_daemon method to use correct exit (Thomas Winget)
96cbecf RPC calls for background daemon added in (Thomas Winget)
9193d6f Daemonize changes pulled in -- daemon builds (Thomas Winget)
Diffstat (limited to 'src/cryptonote_core/checkpoints_create.cpp')
-rw-r--r-- | src/cryptonote_core/checkpoints_create.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/cryptonote_core/checkpoints_create.cpp b/src/cryptonote_core/checkpoints_create.cpp index 9760098c8..2cc9a8164 100644 --- a/src/cryptonote_core/checkpoints_create.cpp +++ b/src/cryptonote_core/checkpoints_create.cpp @@ -113,7 +113,7 @@ bool load_checkpoints_from_json(cryptonote::checkpoints& checkpoints, std::strin return true; } -bool load_checkpoints_from_dns(cryptonote::checkpoints& checkpoints) +bool load_checkpoints_from_dns(cryptonote::checkpoints& checkpoints, bool testnet) { // All four MoneroPulse domains have DNSSEC on and valid static const std::vector<std::string> dns_urls = { "checkpoints.moneropulse.se" @@ -121,6 +121,12 @@ bool load_checkpoints_from_dns(cryptonote::checkpoints& checkpoints) , "checkpoints.moneropulse.net" , "checkpoints.moneropulse.co" }; + + static const std::vector<std::string> testnet_dns_urls = { "testpoints.moneropulse.se" + , "testpoints.moneropulse.org" + , "testpoints.moneropulse.net" + , "testpoints.moneropulse.co" + }; bool avail, valid; std::vector<std::string> records; @@ -132,7 +138,14 @@ bool load_checkpoints_from_dns(cryptonote::checkpoints& checkpoints) size_t cur_index = first_index; do { - records = tools::DNSResolver::instance().get_txt_record(dns_urls[cur_index], avail, valid); + if (testnet) + { + records = tools::DNSResolver::instance().get_txt_record(testnet_dns_urls[cur_index], avail, valid); + } + else + { + records = tools::DNSResolver::instance().get_txt_record(dns_urls[cur_index], avail, valid); + } if (records.size() == 0 || (avail && !valid)) { cur_index++; |