From 25af6b622134e4461689429caed34211a4f1a233 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:04:32 -0300 Subject: [PATCH] rotate keys correctly for testing --- cashu/mint/startup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cashu/mint/startup.py b/cashu/mint/startup.py index 3d3d54d1..1dcf514a 100644 --- a/cashu/mint/startup.py +++ b/cashu/mint/startup.py @@ -45,7 +45,7 @@ ) -async def rotate_keys(n_seconds=10): +async def rotate_keys(n_seconds=60): """Rotate keyset epoch every n_seconds. Note: This is just a helper function for testing purposes. """ @@ -54,7 +54,7 @@ async def rotate_keys(n_seconds=10): i += 1 logger.info("Rotating keys.") incremented_derivation_path = ( - "".join(ledger.derivation_path.split("/")[:-1]) + f"/{i}" + "/".join(ledger.derivation_path.split("/")[:-1]) + f"/{i}" ) await ledger.activate_keyset(incremented_derivation_path) logger.info(f"Current keyset: {ledger.keyset.id}")