upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/selftest.cpp
diff options
context:
space:
mode:
authorBitflash <admin@bitflash.network>2026-08-14 11:38:26 -0300
committerBitflash <admin@bitflash.network>2026-08-14 11:38:26 -0300
commit225a89b643a79b73351abe530d6eb7af8906be63 (patch)
treef39a99147d9265ed9bb98bb830cdf0919c3ba56d /src/selftest.cpp
parentbf62d480ae5d76c04d1a8b27750f51596473cc85 (diff)
parentdd9db5ba5407b9c30b4f41fc1153db39f0770154 (diff)
Merge pull request 'wallet: install backups via temporary file' (#43) from wallet-backup-tempfile-install into main
Diffstat (limited to 'src/selftest.cpp')
-rw-r--r--src/selftest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/selftest.cpp b/src/selftest.cpp
index 638aa66..81c4439 100644
--- a/src/selftest.cpp
+++ b/src/selftest.cpp
@@ -1391,6 +1391,13 @@ static int RunWalletPortabilitySelfTest()
1391 nFail += Check(nBackupRet == 0 && FileExists(strPortableWallet.c_str()), 1391 nFail += Check(nBackupRet == 0 && FileExists(strPortableWallet.c_str()),
1392 "/backupwallet writes a portable wallet.dat") ? 0 : 1; 1392 "/backupwallet writes a portable wallet.dat") ? 0 : 1;
1393 1393
1394 string strBackupOut2 = tmp + "/backupwallet-overwrite.txt";
1395 int nBackupRet2 = RunBitflashChild(strExe, vBackupArgs, NULL, &strBackupOut2);
1396 nFail += Check(nBackupRet2 == 0 && FileExists(strPortableWallet.c_str()) &&
1397 !DirectoryHasFileWithPrefix(tmp, "portable-wallet.dat.tmp.") &&
1398 !DirectoryHasFileWithPrefix(tmp, "portable-wallet.dat.old."),
1399 "/backupwallet replaces an existing backup without leaving temp files") ? 0 : 1;
1400
1394 nFail += Check(CopyFileLocal(strOriginal + "/wallet.dat", 1401 nFail += Check(CopyFileLocal(strOriginal + "/wallet.dat",
1395 strRawCopy + "/wallet.dat"), 1402 strRawCopy + "/wallet.dat"),
1396 "a raw wallet.dat can be copied without database logs") ? 0 : 1; 1403 "a raw wallet.dat can be copied without database logs") ? 0 : 1;