Skip to content

Commit

Permalink
Add pub to xcm::v4::PalletInfo (paritytech#4976)
Browse files Browse the repository at this point in the history
v3 PalletInfo had the fields public, but not v4. Any reason why?
I need the PalletInfo fields public so I can read the values and do some
logic based on that at Polimec
@franciscoaguirre 

If this could be backported would be highly appreciated 🙏🏻

---------

Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
3 people authored and TarekkMA committed Aug 2, 2024
1 parent d0dbc9e commit e3965eb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
12 changes: 6 additions & 6 deletions polkadot/xcm/src/v4/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ parameter_types! {
#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)]
pub struct PalletInfo {
#[codec(compact)]
index: u32,
name: BoundedVec<u8, MaxPalletNameLen>,
module_name: BoundedVec<u8, MaxPalletNameLen>,
pub index: u32,
pub name: BoundedVec<u8, MaxPalletNameLen>,
pub module_name: BoundedVec<u8, MaxPalletNameLen>,
#[codec(compact)]
major: u32,
pub major: u32,
#[codec(compact)]
minor: u32,
pub minor: u32,
#[codec(compact)]
patch: u32,
pub patch: u32,
}

impl TryInto<OldPalletInfo> for PalletInfo {
Expand Down
15 changes: 15 additions & 0 deletions prdoc/pr_4976.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: Add pub to xcm::v4::PalletInfo

doc:
- audience: Runtime Dev
description: |
Forgot to make v4 PalletInfo fields public. Without them we cannot make use of the struct.

crates:
- name: staging-xcm
bump: patch
validate: false

0 comments on commit e3965eb

Please sign in to comment.