Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pallet::call to hotfix sufficients for non-zero nonce accounts #619

Merged
merged 12 commits into from
Jun 2, 2022
Prev Previous commit
use safe add
  • Loading branch information
nbaztec committed Jun 1, 2022
commit 748ef65480de896afef21bdb0d95727d5853bd84
4 changes: 2 additions & 2 deletions frame/hotfix-sufficients/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ pub mod pallet {
let account_id = T::AddressMapping::into_account_id(address);
let nonce = frame_system::Pallet::<T>::account_nonce(&account_id);
let refs = frame_system::Pallet::<T>::consumers(&account_id)
+ frame_system::Pallet::<T>::providers(&account_id)
+ frame_system::Pallet::<T>::sufficients(&account_id);
.saturating_add(frame_system::Pallet::<T>::providers(&account_id))
.saturating_add(frame_system::Pallet::<T>::sufficients(&account_id));

if !nonce.is_zero() && refs.is_zero() {
frame_system::Pallet::<T>::inc_sufficients(&account_id);
Expand Down