From 6f3c43aca62a7d33a19f14f6ad7c16891952673a Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 15 Sep 2026 19:55:21 -0400 Subject: fix: outstanding-stake ledger, owner backpressure, editor state preservation --- internal/casino/types.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/casino/types.go') 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 -- cgit v1.2.3