Fix duplicate blank outputs during melt (#795)

* wip blank outputs

* wip: working

* store ids for promises correctly

* tests

* fix migraiton

* revert

* fix tests

* fix auth server

* fix last tests

* retroactively change migration, initial and m017_foreign_keys_proof_tables, remove c_b and replace with c_ (same for b_)

* fix constraint

* oops

* msg stack fix

* fix test foreign key constraint

* fix postgres tests

* foreign key constraint test

* should fix psql error

* foreign key constraint sqlite

* rename to update_blinded_message_signature

* drop outputs and change columns from melt_quotes table

* switch migration order

* reorder migrations again

* fix migration

* add tests

* fix postgres migration too

* create signed_at column postgres

* foreign key constraingt promises table

* migration tool

* readme
This commit is contained in:
callebtc
2025-10-19 15:50:47 +02:00
committed by GitHub
parent a5f950a8f8
commit 9fed0f0f07
14 changed files with 1588 additions and 335 deletions

View File

@@ -51,13 +51,13 @@ async def test_wallet_subscription_mint(wallet: Wallet):
await asyncio.sleep(wait + 2)
assert triggered
assert len(msg_stack) == 3
assert len(msg_stack) >= 3
assert msg_stack[0].payload["state"] == MintQuoteState.unpaid.value
assert msg_stack[1].payload["state"] == MintQuoteState.paid.value
assert msg_stack[2].payload["state"] == MintQuoteState.issued.value
assert msg_stack[-1].payload["state"] == MintQuoteState.issued.value
@pytest.mark.asyncio
@@ -133,7 +133,9 @@ async def test_wallet_subscription_multiple_listeners_receive_updates(wallet: Wa
from cashu.wallet.subscriptions import SubscriptionManager
subs = SubscriptionManager(wallet.url)
threading.Thread(target=subs.connect, name="SubscriptionManager", daemon=True).start()
threading.Thread(
target=subs.connect, name="SubscriptionManager", daemon=True
).start()
stack1: list[JSONRPCNotficationParams] = []
stack2: list[JSONRPCNotficationParams] = []