From 825d2c4352022e7397854b2bd9ba7d3589873c07 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 15 Feb 2023 23:32:42 +0100 Subject: make wallet-cli runnable under qtart --- packages/taler-harness/src/bench3.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'packages/taler-harness/src/bench3.ts') diff --git a/packages/taler-harness/src/bench3.ts b/packages/taler-harness/src/bench3.ts index 9679f05a6..5e8fac0e9 100644 --- a/packages/taler-harness/src/bench3.ts +++ b/packages/taler-harness/src/bench3.ts @@ -25,12 +25,12 @@ import { j2s, Logger, } from "@gnu-taler/taler-util"; +import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; import { - getDefaultNodeWallet2, - NodeHttpLib, - WalletApiOperation, - Wallet, AccessStats, + createNativeWalletHost2, + Wallet, + WalletApiOperation, } from "@gnu-taler/taler-wallet-core"; import benchMerchantIDGenerator from "./benchMerchantIDGenerator.js"; @@ -50,8 +50,9 @@ export async function runBench3(configJson: any): Promise { throw new Error("Payto template url must contain '${id}' placeholder"); } - const myHttpLib = new NodeHttpLib(); - myHttpLib.setThrottling(false); + const myHttpLib = createPlatformHttpLib({ + enableThrottling: false, + }); const numIter = b3conf.iterations ?? 1; const numDeposits = b3conf.deposits ?? 5; @@ -89,7 +90,7 @@ export async function runBench3(configJson: any): Promise { console.log("wallet DB stats", j2s(getDbStats!())); } - const res = await getDefaultNodeWallet2({ + const res = await createNativeWalletHost2({ // No persistent DB storage. persistentStoragePath: undefined, httpLib: myHttpLib, -- cgit v1.2.3