aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_bank.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 21:36:36 -0400
committerhistoria <[not public]>2026-09-18 21:36:36 -0400
commita8a67482bbff8297a96adff65d2fd7029ed998cc (patch)
treee84f8ba636c8f2edb4d2ff8b45d7cff7298fa7cc /internal/game/cmd_bank.go
parentff04d26ce90d6b411a04a2fb59f7c24ceefb161f (diff)
downloadthehouseoficarus-a8a67482bbff8297a96adff65d2fd7029ed998cc.tar.gz
refactor: replace economy journal with single-file pending-wager wallet
Diffstat (limited to 'internal/game/cmd_bank.go')
-rw-r--r--internal/game/cmd_bank.go7
1 files changed, 3 insertions, 4 deletions
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)