Publish an SSE update from the bet/withdrawal rollback paths (B-49)
_release_failed_bet and _release_failed_withdrawal restored the balance, freed the reserved UTXOs and (for a bet) removed the participant without calling broadcaster.publish(), so every dashboard kept showing the phantom bet and the reduced balance until its next poll — while the success path and the reconciler's own abandon path both published. The two regression tests pre-open the round before subscribing: place_bet opens one itself, and that publish() would otherwise satisfy the assertion whether or not the rollback published anything.
This commit is contained in:
1 parent
4c80c1c5bf
commit
e7f844b11f
6 files changed
+78
-28
No files matched your search
@@ -144,6 +144,11 @@ async def _release_failed_bet(
|
||||
user_id=user_id,
|
||||
)
|
||||
await session.commit()
|
||||
# The rollback moved as much state as the successful path did — the balance is
|
||||
# back, the participant is gone, so participant_count and jackpot shrank again.
|
||||
# Without this the dashboards kept showing the phantom bet until their next poll
|
||||
# (B-49); the reconciler's own abandon path has always published here.
|
||||
broadcaster.publish()
|
||||
|
||||
|
||||
def _pending_transaction(
|
||||
|
||||
@@ -173,3 +173,4 @@ async def _release_failed_withdrawal(
|
||||
user_id=user_id,
|
||||
)
|
||||
await session.commit()
|
||||
broadcaster.publish() # the reserved UTXOs are spendable again — refetch the balance (B-49)
|
||||
Reference in new issue
Block a user