Cron/Mining.php — re-fetches global state after block solve so halving and difficulty checks use the correct block number; market price now only updates when a block is solved; added division by zero guard on max_coins
Repository/MiningSession.php — stopMining() and cleanupInactiveSessions() now delete session rows instead of toggling, preventing unbounded table growth
Repository/Wallet.php — getUserWallet() default changed to createIfMissing = false, preventing empty wallet rows being created for users who have never mined