Box large arguments of GRANDPA pallet (#1154)

* box large arguments

* benchmarks

* fix
This commit is contained in:
Svyatoslav Nikolsky
2021-09-22 13:20:10 +03:00
committed by Bastian Köcher
parent 782d37522f
commit 084da4343d
18 changed files with 67 additions and 33 deletions
+8
View File
@@ -750,4 +750,12 @@ mod tests {
DbWeight::get(),
);
}
#[test]
fn call_size() {
// pallets that are (to be) used by polkadot runtime
const MAX_CALL_SIZE: usize = 230; // value from polkadot-runtime tests
assert!(core::mem::size_of::<pallet_bridge_grandpa::Call<Runtime>>() <= MAX_CALL_SIZE);
assert!(core::mem::size_of::<pallet_bridge_messages::Call<Runtime>>() <= MAX_CALL_SIZE);
}
}