From a8a67482bbff8297a96adff65d2fd7029ed998cc Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 21:36:36 -0400 Subject: refactor: replace economy journal with single-file pending-wager wallet --- internal/game/cmd_bank.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'internal/game/cmd_bank.go') diff --git a/internal/game/cmd_bank.go b/internal/game/cmd_bank.go index 1ec0b7c..deddf0b 100644 --- a/internal/game/cmd_bank.go +++ b/internal/game/cmd_bank.go @@ -417,10 +417,9 @@ func (g *Game) doBankWithdrawCredits(sess *net.Session, parts []string) { // persistBankCredits makes a credit move between the on-hand wallet and the // bank durable, reverting it in memory when the save fails. A best-effort -// save here would leave the in-memory balance ahead of the durable file, and -// a wager taken from that phantom balance journals checkpoints the file can -// never match — recovery then leaves the stake permanently ambiguous instead -// of refunding or settling it. Reports whether the move may be announced. +// save here would leave the in-memory balance ahead of the durable file, so +// a wager taken from that phantom balance would be charged against money the +// player does not durably have. Reports whether the move may be announced. func (g *Game) persistBankCredits(p *player.Player, creditsBefore, bankedBefore int) bool { if err := g.AccountStore.SaveCharacter(p); err != nil { log.Printf("bank credit transfer %s: %v", p.Name, err) -- cgit v1.2.3