mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 00:31:02 +00:00
runtimes: fix call_size() test (#1245)
Signed-off-by: acatangiu <adrian@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
b84d0e4028
commit
8edc9038d1
@@ -922,6 +922,15 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn call_size() {
|
fn call_size() {
|
||||||
|
const BRIDGES_PALLETS_MAX_CALL_SIZE: usize = 200;
|
||||||
|
assert!(
|
||||||
|
core::mem::size_of::<pallet_bridge_grandpa::Call<Runtime>>() <=
|
||||||
|
BRIDGES_PALLETS_MAX_CALL_SIZE
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
core::mem::size_of::<pallet_bridge_messages::Call<Runtime>>() <=
|
||||||
|
BRIDGES_PALLETS_MAX_CALL_SIZE
|
||||||
|
);
|
||||||
const MAX_CALL_SIZE: usize = 230; // value from polkadot-runtime tests
|
const MAX_CALL_SIZE: usize = 230; // value from polkadot-runtime tests
|
||||||
assert!(core::mem::size_of::<Call>() <= MAX_CALL_SIZE);
|
assert!(core::mem::size_of::<Call>() <= MAX_CALL_SIZE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1229,10 +1229,19 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn call_size() {
|
fn call_size() {
|
||||||
const DOT_MAX_CALL_SZ: usize = 230;
|
const BRIDGES_PALLETS_MAX_CALL_SIZE: usize = 200;
|
||||||
assert!(core::mem::size_of::<pallet_bridge_grandpa::Call<Runtime>>() <= DOT_MAX_CALL_SZ);
|
assert!(
|
||||||
// FIXME: get this down to 230. https://github.com/paritytech/grandpa-bridge-gadget/issues/359
|
core::mem::size_of::<pallet_bridge_grandpa::Call<Runtime>>() <=
|
||||||
const BEEFY_MAX_CALL_SZ: usize = 232;
|
BRIDGES_PALLETS_MAX_CALL_SIZE
|
||||||
assert!(core::mem::size_of::<pallet_bridge_messages::Call<Runtime>>() <= BEEFY_MAX_CALL_SZ);
|
);
|
||||||
|
assert!(
|
||||||
|
core::mem::size_of::<pallet_bridge_messages::Call<Runtime>>() <=
|
||||||
|
BRIDGES_PALLETS_MAX_CALL_SIZE
|
||||||
|
);
|
||||||
|
// Largest inner Call is `pallet_session::Call` with a size of 224 bytes. This size is a
|
||||||
|
// result of large `SessionKeys` struct.
|
||||||
|
// Total size of Rialto runtime Call is 232.
|
||||||
|
const MAX_CALL_SIZE: usize = 232;
|
||||||
|
assert!(core::mem::size_of::<Call>() <= MAX_CALL_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user