burn all spent tokens with cashu burn -a

This commit is contained in:
callebtc
2022-09-17 23:26:51 +03:00
parent fac578b956
commit f02ac8d3ee
5 changed files with 57 additions and 25 deletions

View File

@@ -38,6 +38,20 @@ async def get_proofs(
return [Proof.from_row(r) for r in rows]
async def get_reserved_proofs(
db: Database,
conn: Optional[Connection] = None,
):
rows = await (conn or db).fetchall(
"""
SELECT * from proofs
WHERE reserved
"""
)
return [Proof.from_row(r) for r in rows]
async def invalidate_proof(
proof: Proof,
db: Database,