index on db and read spent proofs from db (#370)

* index on db and read spent proofs from db

* add benchmark for testing

* remove benchmark

* add option to disable cached secrets

* disable python 3.9 tests
This commit is contained in:
callebtc
2023-11-26 06:07:38 -03:00
committed by GitHub
parent bff30d493d
commit fa5193cd8f
14 changed files with 253 additions and 164 deletions

View File

@@ -20,6 +20,7 @@ from cashu.mint.ledger import Ledger
SERVER_PORT = 3337
SERVER_ENDPOINT = f"http://localhost:{SERVER_PORT}"
settings.debug = True
settings.cashu_dir = "./test_data/"
settings.mint_host = "localhost"
settings.mint_port = SERVER_PORT
@@ -55,7 +56,8 @@ class UvicornServer(multiprocessing.Process):
async def ledger():
async def start_mint_init(ledger: Ledger):
await migrate_databases(ledger.db, migrations_mint)
await ledger.load_used_proofs()
if settings.mint_cache_secrets:
await ledger.load_used_proofs()
await ledger.init_keysets()
database_name = "test"