Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions frame/balances/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down