Skip to content
  • Kian Paimani's avatar
    Ensure correct variant count in `Runtime[Hold/Freeze]Reason` (#1900) · 35eb133b
    Kian Paimani authored
    
    
    closes https://github.com/paritytech/polkadot-sdk/issues/1882
    
    ## Breaking Changes
    
    This PR introduces a new item to `pallet_balances::Config`:
    
    ```diff
    trait Config {
    ++    type RuntimeFreezeReasons;
    }
    ```
    
    This value is only used to check it against `type MaxFreeze`. A similar
    check has been added for `MaxHolds` against `RuntimeHoldReasons`, which
    is already given to `pallet_balances`.
    
    In all contexts, you should pass the real `RuntimeFreezeReasons`
    generated by `construct_runtime` to `type RuntimeFreezeReasons`. Passing
    `()` would also work, but it would imply that the runtime uses no
    freezes at all.
    
    ---------
    
    Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
    Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
    35eb133b