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:
Diffstat (limited to 'src/selftest.cpp')
-rw-r--r--src/selftest.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/selftest.cpp b/src/selftest.cpp
index 73c2935..5e5bab6 100644
--- a/src/selftest.cpp
+++ b/src/selftest.cpp
@@ -1329,6 +1329,19 @@ static int RunWalletPortabilitySelfTest()
1329 FileContainsText(strOriginalStorageAudit, "malformed records: 0"), 1329 FileContainsText(strOriginalStorageAudit, "malformed records: 0"),
1330 "the storage audit recognizes a plaintext phrase wallet") ? 0 : 1; 1330 "the storage audit recognizes a plaintext phrase wallet") ? 0 : 1;
1331 1331
1332 string strOriginalStorageCheck = tmp + "/original-storage-check.txt";
1333 vector<string> vOriginalStorageCheckArgs;
1334 vOriginalStorageCheckArgs.push_back("-datadir=" + strOriginal);
1335 vOriginalStorageCheckArgs.push_back("-nomanagedtor");
1336 vOriginalStorageCheckArgs.push_back("-nogui");
1337 vOriginalStorageCheckArgs.push_back("-walletstoragecheck");
1338 int nOriginalStorageCheckRet =
1339 RunBitflashChild(strExe, vOriginalStorageCheckArgs, NULL, &strOriginalStorageCheck);
1340 nFail += Check(nOriginalStorageCheckRet == 0 &&
1341 FileContainsText(strOriginalStorageCheck, "storage sanity: ok") &&
1342 FileContainsText(strOriginalStorageCheck, "plain HD seed: complete"),
1343 "the storage sanity check accepts a plaintext phrase wallet") ? 0 : 1;
1344
1332 string strOriginalStorageAuditJson = tmp + "/original-storage-audit.json"; 1345 string strOriginalStorageAuditJson = tmp + "/original-storage-audit.json";
1333 vector<string> vOriginalStorageAuditJsonArgs; 1346 vector<string> vOriginalStorageAuditJsonArgs;
1334 vOriginalStorageAuditJsonArgs.push_back("-datadir=" + strOriginal); 1347 vOriginalStorageAuditJsonArgs.push_back("-datadir=" + strOriginal);
@@ -1419,6 +1432,20 @@ static int RunWalletPortabilitySelfTest()
1419 FileContainsText(strEncryptedStorageAudit, "malformed records: 0"), 1432 FileContainsText(strEncryptedStorageAudit, "malformed records: 0"),
1420 "the storage audit recognizes an encrypted wallet") ? 0 : 1; 1433 "the storage audit recognizes an encrypted wallet") ? 0 : 1;
1421 1434
1435 string strEncryptedStorageCheck = tmp + "/encrypted-storage-check.txt";
1436 vector<string> vEncryptedStorageCheckArgs;
1437 vEncryptedStorageCheckArgs.push_back("-datadir=" + strOriginal);
1438 vEncryptedStorageCheckArgs.push_back("-nomanagedtor");
1439 vEncryptedStorageCheckArgs.push_back("-nogui");
1440 vEncryptedStorageCheckArgs.push_back("-walletstoragecheck");
1441 int nEncryptedStorageCheckRet =
1442 RunBitflashChild(strExe, vEncryptedStorageCheckArgs, NULL, &strEncryptedStorageCheck);
1443 nFail += Check(nEncryptedStorageCheckRet == 0 &&
1444 FileContainsText(strEncryptedStorageCheck, "storage sanity: ok") &&
1445 FileContainsText(strEncryptedStorageCheck, "plain private keys: 0") &&
1446 FileContainsText(strEncryptedStorageCheck, "encrypted HD seed: complete"),
1447 "the storage sanity check accepts an encrypted wallet") ? 0 : 1;
1448
1422 string strEncryptedStorageAuditJson = tmp + "/encrypted-storage-audit.json"; 1449 string strEncryptedStorageAuditJson = tmp + "/encrypted-storage-audit.json";
1423 vector<string> vEncryptedStorageAuditJsonArgs; 1450 vector<string> vEncryptedStorageAuditJsonArgs;
1424 vEncryptedStorageAuditJsonArgs.push_back("-datadir=" + strOriginal); 1451 vEncryptedStorageAuditJsonArgs.push_back("-datadir=" + strOriginal);