You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
After doing some testing myself I realized that running try-runtime with try-state option does actually fail.
When running try-state for some specific pallet we execute the following code:
Select::Only(ref pallet_names) => {let try_state_fns:&[(&'static str,fn(BlockNumber,Select) -> Result<(),&'static str>,)] = &[for_tuples!(
#((<Tupleascrate::traits::PalletInfoAccess>::name(), Tuple::try_state)),*
)];letmut result = Ok(());for(name, try_state_fn)in try_state_fns {if pallet_names.iter().any(|n| n == name.as_bytes()){
result = result.and(try_state_fn(n.clone(), targets.clone()));}}
result
},
The reason it did not fail is that the Collective pallet was not found anywhere inside try_state_fns, so the try-state for the Collective was never actually run.
Tbh I am not entirely sure why the Collective pallet was not found in try_state_fns since the kitchensink runtime does implement the pallet it three instances(CouncilCollective, TechnicalCollective, AllianceCollective).
I have opened a PR that adds a warning message in case the pallet provided to try-state was not found since that could save some time in the future for someone in scenarios like this. #13858
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
Using the
try-runtime
--try-state <PALLET>
flag appears to break the try-state checks in the pallet.Originally reported in this SE question.
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: