Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

grandpa: cleanup stale entries in set id session mapping #13237

Merged
Prev Previous commit
Next Next commit
Update frame/grandpa/src/migrations.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
andresilva and bkchr authored Jan 24, 2023
commit 0cca7c1f8042ded710dea131ec891f7aaaea8dad
2 changes: 1 addition & 1 deletion frame/grandpa/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ fn cleanup_set_id_sesion_map<T: Config>() -> Weight {

T::DbWeight::get()
.reads(1)
.saturating_add(T::DbWeight::get().writes((0..until_set_id).count().saturated_into()))
.saturating_add(T::DbWeight::get().writes(until_set_id))
}