diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index e77b0f5e5d956..fcde46bde89b9 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -730,6 +730,15 @@ pub mod pallet { let existential_deposit = Self::ed(); let wipeout = new_free < existential_deposit; + #[cfg(debug_assertions)] + if wipeout && !new_free.is_zero() { + log::error!( + target: LOG_TARGET, + "Attempt to force balance to be {:?} but this is less than ED {:?}", + new_free, + existential_deposit + ); + } let new_free = if wipeout { Zero::zero() } else { new_free }; // First we try to modify the account's balance to the forced balance.