From 6ef40a5739f1723ec26cc32dfc48fe764f776dca Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 16 Sep 2026 19:57:45 -0400 Subject: fix: durable payouts survive journal failure, cap bank withdrawals, hash passwords off the owner loop. --- internal/game/economy_journal_test_helpers_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 internal/game/economy_journal_test_helpers_test.go (limited to 'internal/game/economy_journal_test_helpers_test.go') diff --git a/internal/game/economy_journal_test_helpers_test.go b/internal/game/economy_journal_test_helpers_test.go new file mode 100644 index 0000000..e65c622 --- /dev/null +++ b/internal/game/economy_journal_test_helpers_test.go @@ -0,0 +1,14 @@ +package game + +import "testing" + +// mustLoadOpen is the test-side loadOpen: a journal fold failure is a test +// failure, not a nil slice to accidentally treat as "nothing open". +func (j *economyJournal) mustLoadOpen(t *testing.T) []*economyRecord { + t.Helper() + open, err := j.loadOpen() + if err != nil { + t.Fatalf("loadOpen: %v", err) + } + return open +} -- cgit v1.2.3