diff options
| author | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-20 15:37:44 -0300 |
|---|---|---|
| committer | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-20 16:08:01 -0300 |
| commit | 28a2656d22a193fcd92d225964da5a01e8183623 (patch) | |
| tree | da4ce79046b258edc1ebc7e0343c696205f26fb2 /src/main.cpp | |
| parent | 0714027dc6fc7266841eeb088a0c52b6db64a62f (diff) | |
net: add isolated testnet parameters
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5bd4028..6fd8c82 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -2497,11 +2497,21 @@ string GetAppDir() | |||
| 2497 | { | 2497 | { |
| 2498 | return "."; | 2498 | return "."; |
| 2499 | } | 2499 | } |
| 2500 | static bool fMkdirDone; | 2500 | static string strCreatedBaseDir; |
| 2501 | if (!fMkdirDone) | 2501 | if (strCreatedBaseDir != strDir) |
| 2502 | { | 2502 | { |
| 2503 | fMkdirDone = true; | ||
| 2504 | _mkdir(strDir.c_str()); | 2503 | _mkdir(strDir.c_str()); |
| 2504 | strCreatedBaseDir = strDir; | ||
| 2505 | } | ||
| 2506 | if (IsTestNet()) | ||
| 2507 | { | ||
| 2508 | strDir += "/testnet"; | ||
| 2509 | static string strCreatedTestnetDir; | ||
| 2510 | if (strCreatedTestnetDir != strDir) | ||
| 2511 | { | ||
| 2512 | _mkdir(strDir.c_str()); | ||
| 2513 | strCreatedTestnetDir = strDir; | ||
| 2514 | } | ||
| 2505 | } | 2515 | } |
| 2506 | return strDir; | 2516 | return strDir; |
| 2507 | } | 2517 | } |