mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 05:11:02 +00:00
Contracts: Charge min amount when processing deletion queue (#2934)
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -322,7 +322,8 @@ impl<T: Config> ContractInfo<T> {
|
|||||||
KillStorageResult::SomeRemaining(_) => return weight_limit,
|
KillStorageResult::SomeRemaining(_) => return weight_limit,
|
||||||
KillStorageResult::AllRemoved(keys_removed) => {
|
KillStorageResult::AllRemoved(keys_removed) => {
|
||||||
entry.remove();
|
entry.remove();
|
||||||
remaining_key_budget = remaining_key_budget.saturating_sub(keys_removed);
|
// charge at least one key even if none were removed.
|
||||||
|
remaining_key_budget = remaining_key_budget.saturating_sub(keys_removed.max(1));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user