aboutsummaryrefslogtreecommitdiff
path: root/internal/game/account_txn.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 20:00:02 -0400
committerhistoria <[not public]>2026-10-05 20:00:02 -0400
commit4bc1daaf259e0c19c5fe4a12ec8bc7f6e5a735c1 (patch)
treef7ea1da2f88f37c44b937aaaf1fd12c722811147 /internal/game/account_txn.go
parenta5447965e7808d656a5e5d9326a9ca0231148f85 (diff)
downloadthehouseoficarus-4bc1daaf259e0c19c5fe4a12ec8bc7f6e5a735c1.tar.gz
feat: terminal talk action, typed pai gow poker phase
Diffstat (limited to 'internal/game/account_txn.go')
-rw-r--r--internal/game/account_txn.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/game/account_txn.go b/internal/game/account_txn.go
index a1a5cf0..77a4219 100644
--- a/internal/game/account_txn.go
+++ b/internal/game/account_txn.go
@@ -482,8 +482,11 @@ func equalsFold(a, b string) bool {
return true
}
-// recoverJournals rolls back leftover lifecycle journals at startup and
-// surfaces unrecoverable ones.
+// recoverJournals rolls back leftover lifecycle journals and surfaces
+// unrecoverable ones. It scans every journal in the directory, so it must run
+// only where no other transaction can be in flight: at startup, or on the game
+// owner goroutine (which serializes every transaction). The mid-game caller in
+// video_poker_banks.go is on the owner.
func (g *Game) recoverJournals() {
if err := persistence.Recover(g.journalDir()); err != nil {
fmt.Fprintf(os.Stderr, "lifecycle journal recovery failed: %v\n", err)