Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Remove Unecessary Feature Control for Pallets (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Lau authored Jul 27, 2021
1 parent 7c8f206 commit 93f8d4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frame/bridge/ethereum/backing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sp-std = { default-features = false, git = "https://github.com/darwinia-n
rlp = { version = "0.5.0" }
# darwinia-network
darwinia-balances = { path = "../../../../frame/balances" }
darwinia-ethereum-relay = { features = ["full-serde"], path = "../relay" }
darwinia-ethereum-relay = { path = "../relay" }
darwinia-relay-primitives = { path = "../../../../primitives/relay" }
darwinia-relayer-game = { path = "../../relayer-game" }
darwinia-staking = { path = "../../../../frame/staking" }
Expand Down
4 changes: 0 additions & 4 deletions frame/bridge/ethereum/relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,3 @@ std = [
"sp-runtime/std",
"sp-std/std",
]

full-serde = [
"ethereum-primitives/full-serde",
]
8 changes: 4 additions & 4 deletions frame/bridge/ethereum/relay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub mod migration {
dbg!(parcel.encode());
}

#[cfg(feature = "full-serde")]
#[cfg(feature = "std")]
pub fn assert_encoded_eq(raw: impl AsRef<str>, encoded: impl AsRef<[u8]>) {
let from_json = serde_json::from_str::<EthereumRelayHeaderParcel>(raw.as_ref()).unwrap();
let from_codec = decode(encoded);
Expand Down Expand Up @@ -1016,7 +1016,7 @@ impl<T: Config> EthereumReceiptT<AccountId<T>, RingBalance<T>> for Module<T> {
}
}

#[cfg_attr(any(feature = "full-serde", test), derive(serde::Deserialize))]
#[cfg_attr(any(feature = "std", test), derive(serde::Deserialize))]
#[derive(Clone, PartialEq, Encode, Decode, RuntimeDebug)]
pub struct EthereumRelayHeaderParcel {
pub header: EthereumHeader,
Expand All @@ -1030,14 +1030,14 @@ impl RelayHeaderParcelInfo for EthereumRelayHeaderParcel {
}
}

#[cfg_attr(any(feature = "full-serde", test), derive(serde::Deserialize))]
#[cfg_attr(any(feature = "std", test), derive(serde::Deserialize))]
#[derive(Clone, PartialEq, Encode, Decode, RuntimeDebug)]
pub struct EthereumRelayProofs {
pub ethash_proof: Vec<EthashProof>,
pub mmr_proof: Vec<H256>,
}

#[cfg_attr(any(feature = "full-serde", test), derive(serde::Deserialize))]
#[cfg_attr(any(feature = "std", test), derive(serde::Deserialize))]
#[derive(Clone, Default, PartialEq, Encode, Decode, RuntimeDebug)]
pub struct MMRProof {
pub member_leaf_index: u64,
Expand Down

0 comments on commit 93f8d4b

Please sign in to comment.