Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Fixed errors.
  • Loading branch information
ayevbeosa committed Nov 4, 2021
commit e92d3a0481d8d871914b722b74ec9e3b3cc1d0ca
8 changes: 4 additions & 4 deletions frame/contracts/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2157,10 +2157,10 @@ mod tests {
},
EventRecord {
phase: Phase::Initialization,
event: MetaEvent::Utility(pallet_utility::Event::BatchInterrupted(
1,
frame_system::Error::<Test>::CallFiltered.into()
),),
event: MetaEvent::Utility(pallet_utility::Event::BatchInterrupted {
index: 1,
error: frame_system::Error:: < Test>::CallFiltered.into()
},),
topics: vec![],
},
]
Expand Down
4 changes: 2 additions & 2 deletions frame/proxy/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ fn filtering_works() {
);
assert_ok!(Proxy::proxy(Origin::signed(4), 1, None, call.clone()));
expect_events(vec![
UtilityEvent::BatchInterrupted(0, SystemError::CallFiltered.into()).into(),
UtilityEvent::BatchInterrupted { index: 0, error: SystemError::CallFiltered.into() }.into(),
ProxyEvent::ProxyExecuted(Ok(())).into(),
]);

Expand All @@ -386,7 +386,7 @@ fn filtering_works() {
);
assert_ok!(Proxy::proxy(Origin::signed(4), 1, None, call.clone()));
expect_events(vec![
UtilityEvent::BatchInterrupted(0, SystemError::CallFiltered.into()).into(),
UtilityEvent::BatchInterrupted { index: 0, error: SystemError::CallFiltered.into() }.into(),
ProxyEvent::ProxyExecuted(Ok(())).into(),
]);

Expand Down
10 changes: 5 additions & 5 deletions frame/utility/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ fn batch_with_signed_filters() {
vec![Call::Balances(pallet_balances::Call::transfer_keep_alive { dest: 2, value: 1 })]
),);
System::assert_last_event(
utility::Event::BatchInterrupted(0, frame_system::Error::<Test>::CallFiltered.into())
utility::Event::BatchInterrupted { index: 0, error: frame_system::Error:: < Test>::CallFiltered.into() }
.into(),
);
});
Expand Down Expand Up @@ -410,7 +410,7 @@ fn batch_handles_weight_refund() {
let result = call.dispatch(Origin::signed(1));
assert_ok!(result);
System::assert_last_event(
utility::Event::BatchInterrupted(1, DispatchError::Other("")).into(),
utility::Event::BatchInterrupted { index: 1, error: DispatchError::Other("") }.into(),
);
// No weight is refunded
assert_eq!(extract_actual_weight(&result, &info), info.weight);
Expand All @@ -425,7 +425,7 @@ fn batch_handles_weight_refund() {
let result = call.dispatch(Origin::signed(1));
assert_ok!(result);
System::assert_last_event(
utility::Event::BatchInterrupted(1, DispatchError::Other("")).into(),
utility::Event::BatchInterrupted { index: 1, error: DispatchError::Other("") }.into(),
);
assert_eq!(extract_actual_weight(&result, &info), info.weight - diff * batch_len);

Expand All @@ -438,7 +438,7 @@ fn batch_handles_weight_refund() {
let result = call.dispatch(Origin::signed(1));
assert_ok!(result);
System::assert_last_event(
utility::Event::BatchInterrupted(1, DispatchError::Other("")).into(),
utility::Event::BatchInterrupted { index: 1, error: DispatchError::Other("") }.into(),
);
assert_eq!(
extract_actual_weight(&result, &info),
Expand Down Expand Up @@ -586,7 +586,7 @@ fn batch_all_does_not_nest() {
// and balances.
assert_ok!(Utility::batch_all(Origin::signed(1), vec![batch_nested]));
System::assert_has_event(
utility::Event::BatchInterrupted(0, frame_system::Error::<Test>::CallFiltered.into())
utility::Event::BatchInterrupted { index: 0, error: frame_system::Error:: < Test>::CallFiltered.into() }
.into(),
);
assert_eq!(Balances::free_balance(1), 10);
Expand Down