mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
Ensure referenda TracksInfo is sorted (#3325)
Changes: - Add `integrity_check` to trait `TracksInfo` to assert the sorting - Use the check in `integrity_test` - Rely upon sorted property in the `info` for speedup Note that the pallet already relies upon this (so far) untested assumption [here](https://github.com/paritytech/polkadot-sdk/blob/44c7a5eb8c375d77f685abf585961421e5f8b228/substrate/frame/referenda/src/lib.rs#L1280). --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
committed by
GitHub
parent
de73dd9ac5
commit
8dc910c8a1
+1
-1
@@ -1,4 +1,4 @@
|
||||
title: Parachains-Aura: Only produce once per slot
|
||||
title: "Parachains-Aura: Only produce once per slot"
|
||||
|
||||
doc:
|
||||
- audience: Node Dev
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
title: "Ensure `TracksInfo` tracks are sorted by ID."
|
||||
|
||||
doc:
|
||||
- audience: Runtime Dev
|
||||
description: |
|
||||
Add a `integrity_check` function to trait `TracksInfo` and explicitly state that tracks must
|
||||
always be sorted by ID. The referenda pallet now also uses this check in its `integrity_test`.
|
||||
|
||||
crates:
|
||||
- name: pallet-referenda
|
||||
Reference in New Issue
Block a user