From a7e1b09c39d134b6a8a6c93d3d4651ff47f6fd31 Mon Sep 17 00:00:00 2001 From: Leouarz Date: Thu, 29 Feb 2024 19:35:06 +0100 Subject: [PATCH 1/3] fix discriminant --- core/src/header/extension/mod.rs | 2 +- core/src/header_version/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/header/extension/mod.rs b/core/src/header/extension/mod.rs index 6e92696..e5278a8 100644 --- a/core/src/header/extension/mod.rs +++ b/core/src/header/extension/mod.rs @@ -16,7 +16,7 @@ pub mod v3; #[cfg_attr(feature = "runtime", derive(PassByCodec))] #[repr(u8)] pub enum HeaderExtension { - V3(v3::HeaderExtension) = 3, + V3(v3::HeaderExtension) = 2, } /// It forwards the call to the inner version of the header. Any invalid version will return the diff --git a/core/src/header_version/mod.rs b/core/src/header_version/mod.rs index e7cbd01..0afdabf 100644 --- a/core/src/header_version/mod.rs +++ b/core/src/header_version/mod.rs @@ -6,5 +6,5 @@ use sp_runtime_interface::pass_by::PassByCodec; #[derive(Debug, Clone, Copy, Eq, PartialEq, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "runtime", derive(PassByCodec))] pub enum HeaderVersion { - V3 = 3, // Current one + V3 = 2, // Current one } From 0eea4cf9f61e676397397012b28fdf324ddcc1a8 Mon Sep 17 00:00:00 2001 From: Leouarz Date: Thu, 29 Feb 2024 19:51:00 +0100 Subject: [PATCH 2/3] fix hash for tests --- core/src/header/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/header/mod.rs b/core/src/header/mod.rs index 2bf824f..647b9a0 100644 --- a/core/src/header/mod.rs +++ b/core/src/header/mod.rs @@ -419,7 +419,7 @@ mod tests { assert_eq!( hash, H256(hex!( - "0aaeda45f6b0258b5453c11c77c6cdedae3739c90a1a82851cfa5646236dc497" + "0xc9941af1cb862db9f2e4c0c94f457d1217b363ecf6e6cc0dbeb5cbfeb35fbc12" )) ); From e3697943cc909cdd8c8c1675f56343afad1bf4e1 Mon Sep 17 00:00:00 2001 From: Leouarz Date: Thu, 29 Feb 2024 19:58:01 +0100 Subject: [PATCH 3/3] fix hash for test --- core/src/header/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/header/mod.rs b/core/src/header/mod.rs index 647b9a0..5aaac65 100644 --- a/core/src/header/mod.rs +++ b/core/src/header/mod.rs @@ -419,7 +419,7 @@ mod tests { assert_eq!( hash, H256(hex!( - "0xc9941af1cb862db9f2e4c0c94f457d1217b363ecf6e6cc0dbeb5cbfeb35fbc12" + "c9941af1cb862db9f2e4c0c94f457d1217b363ecf6e6cc0dbeb5cbfeb35fbc12" )) );