Skip to content

Commit 4613a9a

Browse files
committed
add xcm size limit test
1 parent f981733 commit 4613a9a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

xtokens/src/tests.rs

+8
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,18 @@ fn send_as_sovereign_fails_if_bad_origin() {
428428

429429
#[test]
430430
fn call_size_limit() {
431+
// Ensures Call enum doesn't allocate more than 200 bytes in runtime
431432
assert!(
432433
core::mem::size_of::<crate::Call::<crate::tests::para::Runtime>>() <= 200,
433434
"size of Call is more than 200 bytes: some calls have too big arguments, use Box to \
434435
reduce the size of Call.
435436
If the limit is too strong, maybe consider increasing the limit",
436437
);
438+
439+
assert!(
440+
core::mem::size_of::<orml_xcm::Call::<crate::tests::para::Runtime>>() <= 200,
441+
"size of Call is more than 200 bytes: some calls have too big arguments, use Box to \
442+
reduce the size of Call.
443+
If the limit is too strong, maybe consider increasing the limit",
444+
);
437445
}

0 commit comments

Comments
 (0)