aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-22 13:36:57 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-22 13:36:57 +0200
commit7de43154d3995ae9bd024012825e87feec9c7606 (patch)
tree6d842f036ccf5a75c6523f3e720d316aab8b1156 /src/common
parentMerge pull request #1773 (diff)
parentupdates: remove testnet case (diff)
downloadmonero-7de43154d3995ae9bd024012825e87feec9c7606.tar.xz
Merge pull request #1774
59013316 updates: remove testnet case (moneromooo-monero) 822577eb updates: we now have a user URL, and an automatic one (moneromooo-monero) 9f17b1a3 updates: s/monerod/monero/ for the main download (moneromooo-monero) 6a5dfb88 updates: add all update servers (moneromooo-monero) 72d40f13 updates: use HTTP, not HTTPS (moneromooo-monero)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/updates.cpp15
-rw-r--r--src/common/updates.h4
2 files changed, 10 insertions, 9 deletions
diff --git a/src/common/updates.cpp b/src/common/updates.cpp
index c84566f57..8878bb062 100644
--- a/src/common/updates.cpp
+++ b/src/common/updates.cpp
@@ -35,7 +35,7 @@
namespace tools
{
- bool check_updates(const std::string &software, const std::string &buildtag, bool testnet, std::string &version, std::string &hash)
+ bool check_updates(const std::string &software, const std::string &buildtag, std::string &version, std::string &hash)
{
std::vector<std::string> records;
bool found = false;
@@ -44,12 +44,13 @@ namespace tools
// All four MoneroPulse domains have DNSSEC on and valid
static const std::vector<std::string> dns_urls = {
+ "updates.moneropulse.org",
+ "updates.moneropulse.net",
+ "updates.moneropulse.co",
+ "updates.moneropulse.se"
};
- static const std::vector<std::string> testnet_dns_urls = { "testver.moneropulse.net"
- };
-
- if (!tools::dns_utils::load_txt_records_from_dns(records, testnet ? testnet_dns_urls : dns_urls))
+ if (!tools::dns_utils::load_txt_records_from_dns(records, dns_urls))
return false;
for (const auto& record : records)
@@ -94,9 +95,9 @@ namespace tools
return found;
}
- std::string get_update_url(const std::string &software, const std::string &subdir, const std::string &buildtag, const std::string &version)
+ std::string get_update_url(const std::string &software, const std::string &subdir, const std::string &buildtag, const std::string &version, bool user)
{
- static const char base[] = "https://updates.getmonero.org/";
+ static const char *base = user ? "https://downloads.getmonero.org/" : "http://updates.getmonero.org/";
#ifdef _WIN32
static const char extension[] = ".zip";
#else
diff --git a/src/common/updates.h b/src/common/updates.h
index 1a70e06fd..e494ed7ac 100644
--- a/src/common/updates.h
+++ b/src/common/updates.h
@@ -32,6 +32,6 @@
namespace tools
{
- bool check_updates(const std::string &software, const std::string &buildtag, bool bestnet, std::string &version, std::string &hash);
- std::string get_update_url(const std::string &software, const std::string &subdir, const std::string &buildtag, const std::string &version);
+ bool check_updates(const std::string &software, const std::string &buildtag, std::string &version, std::string &hash);
+ std::string get_update_url(const std::string &software, const std::string &subdir, const std::string &buildtag, const std::string &version, bool user);
}