Skip to content

Commit

Permalink
Backport pallet info pub to SDK 1.14.0 (#5202)
Browse files Browse the repository at this point in the history
Backporting #4976 to
version 1.14.0.

The fields in `PalletInfo` were not `pub` in XCMv4 when they were for
XCMv3.

---------

Co-authored-by: Juan Ignacio Rios <54085674+JuaniRios@users.noreply.github.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
4 people authored Aug 15, 2024
1 parent 21a1bf8 commit 3a7c3da
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion polkadot/xcm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "staging-xcm"
description = "The basic XCM datastructures. (polkadot v1.14.0)"
version = "14.0.1"
version = "14.0.2"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
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
13 changes: 13 additions & 0 deletions prdoc/pr_5202.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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

0 comments on commit 3a7c3da

Please sign in to comment.