Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
Open
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 scripts/download_incr_DB.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ def getURL():
if CDN_ENDPOINT_URL:
return f"{CDN_ENDPOINT_URL}"
if isGCP():
return "http://"+BUCKET_NAME+".storage.googleapis.com"
return "https://"+BUCKET_NAME+".storage.googleapis.com"
elif AWS_ENDPOINT_URL:
return f"{AWS_ENDPOINT_URL}/{BUCKET_NAME}"
else:
return "http://"+BUCKET_NAME+".s3.amazonaws.com"
return "https://"+BUCKET_NAME+".s3.amazonaws.com"

def UploadLock():
response = requests.get(getURL()+"/"+PERSISTENCE_SNAPSHOT_NAME+"/"+TESTNET_NAME+"/.lock", headers=EXCLUDE_CDN_CACHE_HEADER)
Expand Down
4 changes: 2 additions & 2 deletions scripts/upload_incr_DB.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def getURL():
if CDN_ENDPOINT_URL:
return f"{CDN_ENDPOINT_URL}"
if isGCP():
return "http://"+BUCKET_NAME+".storage.googleapis.com"
return "https://"+BUCKET_NAME+".storage.googleapis.com"
elif AWS_ENDPOINT_URL:
return f"{AWS_ENDPOINT_URL}/{BUCKET_NAME}"
else:
return "http://"+BUCKET_NAME+".s3.amazonaws.com"
return "https://"+BUCKET_NAME+".s3.amazonaws.com"

def awsCli():
if AWS_ENDPOINT_URL:
Expand Down
20 changes: 18 additions & 2 deletions src/cmd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <algorithm>
#include <iostream>
#include <fstream>
#include <optional>

#include <boost/asio.hpp>
Expand Down Expand Up @@ -50,6 +51,9 @@ int main(int argc, const char* argv[]) {
Peer my_network_info;
string privK;
string pubK;
string line;
ifstream privKFile;
ifstream extSeedPrivKFile;
PrivKey privkey;
PubKey pubkey;
string extSeedPrivK;
Expand Down Expand Up @@ -111,7 +115,13 @@ int main(int argc, const char* argv[]) {
po::notify(vm);

try {
privkey = PrivKey::GetPrivKeyFromString(privK);
privKFile.open(privK);
if (privKFile.fail()) {
privkey = PrivKey::GetPrivKeyFromString(privK);
} else {
getline(privKFile, line);
privkey = PrivKey::GetPrivKeyFromString(line);
}
} catch (std::invalid_argument& e) {
std::cerr << e.what() << endl;
return ERROR_IN_COMMAND_LINE;
Expand All @@ -130,7 +140,13 @@ int main(int argc, const char* argv[]) {
return ERROR_IN_COMMAND_LINE;
}
if (!extSeedPrivK.empty()) {
extSeedPrivKey = PrivKey::GetPrivKeyFromString(extSeedPrivK);
extSeedPrivKFile.open(extSeedPrivK);
if (extSeedPrivKFile.fail()) {
extSeedPrivKey = PrivKey::GetPrivKeyFromString(extSeedPrivK);
} else {
getline(extSeedPrivKFile, line);
extSeedPrivKey = PrivKey::GetPrivKeyFromString(line);
}
extSeedPubKey = PubKey(extSeedPrivKey);
}
} catch (std::invalid_argument& e) {
Expand Down