removed restart of havenod on account delete or restore

This commit is contained in:
duriancrepe 2022-06-05 21:45:11 -07:00 committed by woodser
parent 173bb4a807
commit 3465eb5ce6
2 changed files with 10 additions and 11 deletions

View File

@ -434,21 +434,20 @@ test("Can manage an account (CI)", async () => {
stream.end(); stream.end();
assert(size > 0); assert(size > 0);
// delete account which shuts down server // delete account
await user3.deleteAccount(); // TODO: support deleting and restoring account without shutting down server, #310 await user3.deleteAccount();
assert(!await user3.isConnectedToDaemon()); do { await wait(1000); }
await releaseHavenoProcess(user3); while(!await user3.isConnectedToDaemon());
assert(!await user3.accountExists());
// restore account which shuts down server // restore account
user3 = await initHaveno(user3Config);
const zipBytes: Uint8Array = new Uint8Array(fs.readFileSync(zipFile)); const zipBytes: Uint8Array = new Uint8Array(fs.readFileSync(zipFile));
await user3.restoreAccount(zipBytes); await user3.restoreAccount(zipBytes);
assert(!await user3.isConnectedToDaemon()); do { await wait(1000); }
await releaseHavenoProcess(user3); while(!await user3.isConnectedToDaemon());
assert(await user3.accountExists());
// open restored account // open restored account
user3 = await initHaveno(user3Config);
assert(await user3.accountExists());
await user3.openAccount(password); await user3.openAccount(password);
assert(await user3.isAccountOpen()); assert(await user3.isAccountOpen());

View File

@ -356,7 +356,7 @@ export default class HavenoClient {
} }
/** /**
* Permanently delete the Haveno account and shutdown the server. // TODO: possible to not shutdown server? * Permanently delete the Haveno account.
*/ */
async deleteAccount(): Promise<void> { async deleteAccount(): Promise<void> {
try { try {