From e8494b8e506d724b104b258939e3ee4bae392057 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Wed, 26 Aug 2026 19:36:36 +0200 Subject: [PATCH] fix(platform-wallet): re-seed shield regression fixture for the protocol 14 fee rebalance The #4467 rebalance dropped the PV14 two-action minimum shielded fee to 114,140,000 credits, so the shield planner's input-0 reserve (2x the fee) fell from 325,702,400 to 228,280,000. The usable-suffix regression fixture seeded its leading address with 297,264,780 - below the old reserve but above the new one - so the address no longer stays out of the usable suffix and the test's guard assert panics on a clean checkout when run with --features shielded. Re-seed the leading address to 197,264,780 (back below the reserve) and update the guard and the derived account total. The other balances, the usable-suffix total, and the pinned capacity-error values are unchanged, preserving the regression's intent: max shieldable capacity must be reported from the usable suffix, not the total account balance. Co-Authored-By: Claude Fable 5 --- packages/rs-platform-wallet/src/wallet/platform_wallet.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/rs-platform-wallet/src/wallet/platform_wallet.rs b/packages/rs-platform-wallet/src/wallet/platform_wallet.rs index b6d29e67c40..fcf3ddc03d5 100644 --- a/packages/rs-platform-wallet/src/wallet/platform_wallet.rs +++ b/packages/rs-platform-wallet/src/wallet/platform_wallet.rs @@ -2182,19 +2182,19 @@ mod shield_input_selection_tests { // Real account snapshot: the leading address is below the reserve, so // capacity must come from the usable suffix, not the account total. assert!( - 297_264_780 <= reserve(), + 197_264_780 <= reserve(), "regression shape requires the leading address to stay below the reserve; \ - re-seed the balances if the versioned reserve drops under 297_264_780" + re-seed the balances if the versioned reserve drops under 197_264_780" ); let candidates = vec![ - (addr(1), 297_264_780), + (addr(1), 197_264_780), (addr(2), 2_000_000_000), (addr(3), 1_623_849_220), ]; let plan = plan(candidates).unwrap(); let expected_max = 3_623_849_220 - reserve(); - assert_eq!(plan.preflight.account_balance_credits, 3_921_114_000); + assert_eq!(plan.preflight.account_balance_credits, 3_821_114_000); assert_eq!(plan.preflight.usable_balance_credits, 3_623_849_220); assert_eq!(plan.preflight.fee_reserve_credits, reserve()); assert_eq!(plan.preflight.max_shieldable_credits, expected_max);