diff --git a/scripts/download_incr_DB.py b/scripts/download_incr_DB.py index 25c51172e3..d5180b31e5 100644 --- a/scripts/download_incr_DB.py +++ b/scripts/download_incr_DB.py @@ -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) diff --git a/scripts/upload_incr_DB.py b/scripts/upload_incr_DB.py index 3b9e550e38..496637d681 100755 --- a/scripts/upload_incr_DB.py +++ b/scripts/upload_incr_DB.py @@ -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: diff --git a/src/cmd/main.cpp b/src/cmd/main.cpp index 803d38c470..2427318bb7 100644 --- a/src/cmd/main.cpp +++ b/src/cmd/main.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -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; @@ -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; @@ -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) {