From 9dab105e2eff9addbdb094de6bf09bf085a696e7 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Sun, 1 Mar 2015 03:36:46 -0500 Subject: DNS checkpoint loading for testnet should now be correct --- src/cryptonote_core/checkpoints_create.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/cryptonote_core/checkpoints_create.cpp') diff --git a/src/cryptonote_core/checkpoints_create.cpp b/src/cryptonote_core/checkpoints_create.cpp index 31ae9655b..9a21baac5 100644 --- a/src/cryptonote_core/checkpoints_create.cpp +++ b/src/cryptonote_core/checkpoints_create.cpp @@ -112,7 +112,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 dns_urls = { "checkpoints.moneropulse.se" @@ -120,6 +120,12 @@ bool load_checkpoints_from_dns(cryptonote::checkpoints& checkpoints) , "checkpoints.moneropulse.net" , "checkpoints.moneropulse.co" }; + + static const std::vector testnet_dns_urls = { "testpoints.moneropulse.se" + , "testpoints.moneropulse.org" + , "testpoints.moneropulse.net" + , "testpoints.moneropulse.co" + }; bool avail, valid; std::vector records; @@ -131,7 +137,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++; -- cgit v1.2.3 From 7e72e943db5b2661c669c5631a15b595488677af Mon Sep 17 00:00:00 2001 From: smooth Date: Fri, 6 Mar 2015 02:38:06 -0800 Subject: update checkpoint --- src/cryptonote_core/checkpoints_create.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cryptonote_core/checkpoints_create.cpp') diff --git a/src/cryptonote_core/checkpoints_create.cpp b/src/cryptonote_core/checkpoints_create.cpp index 31ae9655b..9760098c8 100644 --- a/src/cryptonote_core/checkpoints_create.cpp +++ b/src/cryptonote_core/checkpoints_create.cpp @@ -76,6 +76,7 @@ bool create_checkpoints(cryptonote::checkpoints& checkpoints) ADD_CHECKPOINT(231350, "b5add137199b820e1ea26640e5c3e121fd85faa86a1e39cf7e6cc097bdeb1131"); ADD_CHECKPOINT(232150, "955de8e6b6508af2c24f7334f97beeea651d78e9ade3ab18fec3763be3201aa8"); ADD_CHECKPOINT(249380, "654fb0a81ce3e5caf7e3264a70f447d4bd07586c08fa50f6638cc54da0a52b2d"); + ADD_CHECKPOINT(460000, "75037a7aed3e765db96c75bcf908f59d690a5f3390baebb9edeafd336a1c4831"); return true; } -- cgit v1.2.3