Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/gridcoin/scraper/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ std::string Http::GetLatestVersionResponse()

void Http::DownloadSnapshot()
{
std::string url = GetArg("-snapshoturl", "https://download.gridcoin.us/download/downloadstake/signed/snapshot.zip");
std::string url = GetArg("-snapshoturl", "https://snapshot.gridcoin.us/snapshot.zip");

fs::path destination = GetDataDir() / "snapshot.zip";

Expand Down Expand Up @@ -383,7 +383,7 @@ std::string Http::GetSnapshotSHA256()
{
std::string buffer;
std::string header;
std::string url = GetArg("-snapshotsha256url", "https://download.gridcoin.us/download/downloadstake/signed/snapshot.zip.sha256");
std::string url = GetArg("-snapshotsha256url", "https://snapshot.gridcoin.us/snapshot.zip.sha256");

struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Accept: */*");
Expand Down
20 changes: 14 additions & 6 deletions src/gridcoin/upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,22 @@ bool Upgrade::CleanupBlockchainData()
{
if (fs::is_directory(Iter->path()))
{
size_t DirLoc = Iter->path().string().find("txleveldb");

if (DirLoc != std::string::npos)
if (!fs::remove_all(*Iter))
return false;
for (const auto& path_segment : Iter->path())
{
if (path_segment.string() == "txleveldb")
{
if (!fs::remove_all(*Iter)) return false;
}
}

for (const auto& path_segment : Iter->path())
{
if (path_segment.string() == "accrual")
{
if (!fs::remove_all(*Iter)) return false;
}
}
continue;

}

else if (fs::is_regular_file(*Iter))
Expand Down