Log XCMP Queue Errors (#1147)

* test invalid xcmp data

* proper messaging

* cargo fmt

* Use `error` instead of `info`

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Doordashcon
2022-04-12 21:39:17 +01:00
committed by GitHub
parent ee7d4e4e2a
commit e1963ef070
2 changed files with 17 additions and 1 deletions
+12
View File
@@ -65,6 +65,18 @@ fn handle_blob_message() {
});
}
#[test]
#[should_panic = "Invalid incoming XCMP message data"]
#[cfg(debug_assertions)]
fn handle_invalid_data() {
new_test_ext().execute_with(|| {
let data = Xcm::<Test>(vec![]).encode();
InboundXcmpMessages::<Test>::insert(ParaId::from(1000), 1, data);
let format = XcmpMessageFormat::ConcatenatedVersionedXcm;
XcmpQueue::process_xcmp_message(1000.into(), (1, format), 10_000_000_000, 10_000_000_000);
});
}
#[test]
fn service_overweight_unknown() {
new_test_ext().execute_with(|| {