-
Notifications
You must be signed in to change notification settings - Fork 699
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
Change pallet referenda TracksInfo::tracks to return an iterator #2072
base: master
Are you sure you want to change the base?
Conversation
b059f67
to
4bc9edc
Compare
NOTE: I realized that return_position_impl_trait_in_trait was recently stabilized, I think it's worth using it in this feature as it makes usage of the trait much simpler. Please consider updating the rust toolchain :) EDIT: As the policy is to keep things working with stable Rust, I reverted the usage of the nightly feature( |
5c3ab3b
to
57585ac
Compare
50a8759
to
355615d
Compare
c3abd5b
to
e1a2699
Compare
4994d7e
to
47c9710
Compare
750f1bb
to
e0d4e7c
Compare
e0d4e7c
to
e37fe07
Compare
cumulus/parachains/runtimes/collectives/collectives-westend/src/fellowship/tracks.rs
Outdated
Show resolved
Hide resolved
cumulus/parachains/runtimes/collectives/collectives-polkadot/src/ambassador/tracks.rs
Outdated
Show resolved
Hide resolved
@muharem the feature is working, this week we released pallet-communities in Kreivo which allows DAOs to make use of the pallet-referenda infrastructure and set-up/configure their own tracks dynamically with pallet-referenda-tracks implemented by @pandres95 |
@olanod to have a setup example would be still good |
Using an iterator instead of a static slice allows for more flexible implementations of `TracksInfo` that can use the chain storage without compromising a lot on the performance/memory penalty if we were to return an owned `Vec` instead.
ce4ec43
to
3503e9c
Compare
…anod/polkadot-sdk into olanod-referenda-owned-tracks
Returning an iterator in
TracksInfo::tracks()
instead of a static slice allows for more flexible implementations ofTracksInfo
that can use the chain storage without compromising a lot on the performance/memory penalty if we were to return an ownedVec
instead.