taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 435f9925dcbe3578ff631b3b4f95c7ef57231d72
parent 4e3645e6de61b26c888bbc59e4a1c716d83c8fc7
Author: Florian Dold <dold@taler.net>
Date:   Mon, 14 Sep 2026 01:42:38 +0200

taler-harness: start cherry-picking clocks at UTC midnight

Keep the later three-hour wallet advance away from the new
denomination generation's withdrawal deadline.

Diffstat:
Mpackages/taler-harness/src/integrationtests/test-exchange-keys-cherrypick.ts | 18++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-exchange-keys-cherrypick.ts b/packages/taler-harness/src/integrationtests/test-exchange-keys-cherrypick.ts @@ -122,6 +122,13 @@ export async function runExchangeKeysCherrypickTest( exchange.addOfferedCoins(defaultCoinConfig); + // Denomination withdrawal deadlines are rounded to midnight. Start just + // after midnight so the later three-hour wallet advance cannot expire the + // new generation before the final withdrawal. + const dayMs = Duration.toMilliseconds(Duration.fromSpec({ days: 1 })); + const initialOffsetMs = dayMs - (Date.now() % dayMs); + exchange.setTimetravel(initialOffsetMs); + await exchange.start(); await exchange.pingUntilAvailable(); @@ -143,6 +150,9 @@ export async function runExchangeKeysCherrypickTest( const { walletClient } = await createWalletDaemonWithClient(t, { name: "wallet", }); + await walletClient.call(WalletApiOperation.TestingSetTimetravel, { + offsetMs: initialOffsetMs, + }); t.logStep("setup done"); @@ -185,7 +195,7 @@ export async function runExchangeKeysCherrypickTest( // of. await applyTimeTravelV2( - Duration.toMilliseconds(Duration.fromSpec({ days: 10 })), + initialOffsetMs + Duration.toMilliseconds(Duration.fromSpec({ days: 10 })), { exchange, walletClient }, ); @@ -232,9 +242,9 @@ export async function runExchangeKeysCherrypickTest( // the newest stamp_start it saw is a valid cherry-picking point. await walletClient.call(WalletApiOperation.TestingSetTimetravel, { - offsetMs: Duration.toMilliseconds( - Duration.fromSpec({ days: 10, hours: 3 }), - ), + offsetMs: + initialOffsetMs + + Duration.toMilliseconds(Duration.fromSpec({ days: 10, hours: 3 })), }); keysRequests.length = 0;