diff options
| author | Boss Marco <bossm8@bfh.ch> | 2021-11-14 12:57:21 +0100 | 
|---|---|---|
| committer | Boss Marco <bossm8@bfh.ch> | 2021-11-14 12:57:21 +0100 | 
| commit | f8c0242f5306cccd52b0f9432b5acbb63fa38e08 (patch) | |
| tree | 378f07e35623ea51552caeba7aec55ef1aa3cd3e | |
| parent | ba198eab4a368b3a8dc2992e17e2b88ad377e287 (diff) | |
fix wallet.stop
| -rw-r--r-- | packages/taler-wallet-cli/src/bench1.ts | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/taler-wallet-cli/src/bench1.ts b/packages/taler-wallet-cli/src/bench1.ts index f0db9761a..30ef8732f 100644 --- a/packages/taler-wallet-cli/src/bench1.ts +++ b/packages/taler-wallet-cli/src/bench1.ts @@ -62,13 +62,16 @@ export async function runBench1(configJson: any): Promise<void> {      // otherwise the TPS go down       // my assumption is that the in-memory db file gets too large       if (i % restartWallet == 0) { +      if (Object.keys(wallet).length !== 0) { +	      wallet.stop(); +      }        wallet = await getDefaultNodeWallet({          // No persistent DB storage.          persistentStoragePath: undefined,          httpLib: myHttpLib,        }); +      await wallet.client.call(WalletApiOperation.InitWallet, {});      } -    await wallet.client.call(WalletApiOperation.InitWallet, {});      logger.trace(`Starting withdrawal amount=${withdrawAmount}`);      let start = Date.now(); @@ -101,8 +104,6 @@ export async function runBench1(configJson: any): Promise<void> {        logger.info(`Finished deposit amount=10 time=${Date.now() - start}`);      } - -    wallet.stop();    }  }  | 
