Mint: store Y in db (#412)

* storage y db

* for proofs_pending as well

* pending check with Y

* fix pending table

* test_race_pending

* skip race condition test on github

* skip test on github actions

* move test_cli.py -> test_wallet_cli.py

* get full proof from memory

* add domain separation wallet
This commit is contained in:
callebtc
2024-02-10 22:52:55 +01:00
committed by GitHub
parent 1de7abf032
commit 6db4604f99
12 changed files with 264 additions and 48 deletions

View File

@@ -1,4 +1,5 @@
import asyncio
import importlib
import multiprocessing
import os
import shutil
@@ -45,7 +46,7 @@ assert "test" in settings.cashu_dir
shutil.rmtree(settings.cashu_dir, ignore_errors=True)
Path(settings.cashu_dir).mkdir(parents=True, exist_ok=True)
from cashu.mint.startup import lightning_backend # noqa
# from cashu.mint.startup import lightning_backend # noqa
@pytest.fixture(scope="session")
@@ -99,7 +100,8 @@ async def ledger():
db_file = os.path.join(settings.mint_database, "mint.sqlite3")
if os.path.exists(db_file):
os.remove(db_file)
wallets_module = importlib.import_module("cashu.lightning")
lightning_backend = getattr(wallets_module, settings.mint_lightning_backend)()
backends = {
Method.bolt11: {Unit.sat: lightning_backend},
}