Companion for substrate#10632 (#4689)

* Companion for substrate#10632

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* cargo format

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix bags-list

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Update Substrate

* Fix

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix bridges test

* FMT

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Qinxuan Chen
2022-01-25 18:58:17 +08:00
committed by GitHub
parent 6b7e40cd6c
commit f4ec9b0341
14 changed files with 335 additions and 358 deletions
+3 -2
View File
@@ -649,11 +649,12 @@ mod tests {
fn should_fail_on_weight_mismatch() {
new_test_ext().execute_with(|| {
let id = [0; 4];
let call = Call::System(frame_system::Call::remark { remark: vec![1, 2, 3] });
let call =
Call::System(frame_system::Call::remark_with_event { remark: vec![1, 2, 3] });
let call_weight = call.get_dispatch_info().weight;
let mut message = prepare_root_message(call);
message.weight = 7;
assert!(call_weight != 7, "needed for test to actually trigger a weight mismatch");
assert!(call_weight > 7, "needed for test to actually trigger a weight mismatch");
System::set_block_number(1);
let result = Dispatch::dispatch(