diff options
| author | historia <[not public]> | 2026-09-18 21:50:17 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 21:50:17 -0400 |
| commit | 2c38386484cdb507c4687caceb37e0b963e33594 (patch) | |
| tree | b25ecf9f509a48d8126f5a4b3a0482de42676239 /building_guide | |
| parent | e7848ea79a9a57fdf391d30c48ce649f3d2f6180 (diff) | |
| download | thehouseoficarus-2c38386484cdb507c4687caceb37e0b963e33594.tar.gz | |
fix: make slot payout and stake resolution one durable save
Diffstat (limited to 'building_guide')
| -rw-r--r-- | building_guide/concurrency.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/building_guide/concurrency.md b/building_guide/concurrency.md index f0b8b06..40be4d9 100644 --- a/building_guide/concurrency.md +++ b/building_guide/concurrency.md @@ -125,11 +125,12 @@ there is no cross-file crash window to reconcile. - **Wager** — debits chips then credits and appends a `PendingWager` (its wallet handle plus the exact chips/credits debited) in the SAME save. The entry stays until the round resolves. -- **Settlement** — `PayStakeCover` credits the payout and removes the stakes - it returns in the same save (a table hand includes its stake return in the - payout). `PayCredits` credits winnings that carry no stake linkage (a slot - spin: the stake was consumed by the round) and the game then resolves the - stake with `ResolveStake`/`ResolveStakes`. +- **Settlement** — `PayCredits(amount, stakeIDs...)` credits the payout and + removes the listed stakes in the same save. A table passes the hand's stake + IDs (its payout includes their return); a slot win passes its triggering + stake (its payout is winnings only). Either way the credit and the stake + consumption are atomic, so a crash can never pay the win and refund the + stake. - **Loss/forfeit** — `ResolveStake`/`ResolveStakes` consume the pending stakes in one save; the round resolved and the stake is gone. - **Refund** — `RefundOutstanding` returns every pending stake (chips in |
