diff options
| author | historia <[not public]> | 2026-09-15 19:55:21 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-15 19:55:21 -0400 |
| commit | 6f3c43aca62a7d33a19f14f6ad7c16891952673a (patch) | |
| tree | 0b0665ef624ef442df87ec7131129aaecc3420bd /internal/casino/types.go | |
| parent | cd95de60364aba8f5bdf8ec86f7234a9903eacc8 (diff) | |
| download | thehouseoficarus-6f3c43aca62a7d33a19f14f6ad7c16891952673a.tar.gz | |
fix: outstanding-stake ledger, owner backpressure, editor state preservation
Diffstat (limited to 'internal/casino/types.go')
| -rw-r--r-- | internal/casino/types.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/casino/types.go b/internal/casino/types.go index 75d041b..d000375 100644 --- a/internal/casino/types.go +++ b/internal/casino/types.go @@ -171,6 +171,17 @@ type Wallet interface { // credit could not be persisted (the game must not report a win that // is not durable). PayCredits(amount int) error + // ResolveStakes marks every outstanding stake for this player as + // settled: the round resolved (won, lost, pushed, or forfeited), so + // startup recovery must no longer refund it. A stake whose wager + // record remains open at restart is refunded by recovery. + ResolveStakes() + // RefundOutstanding returns every outstanding stake to the player + // (chips as chips, credits through the durable payout path) and + // resolves the stakes. It reports the amounts returned. An error + // means the refund could not be made durable: the stakes remain open + // and startup recovery completes the refund. + RefundOutstanding() (chips, credits int, err error) } type EventType string |
