mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +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::AllRemoved(keys_removed) => {
|
||||
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