mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 15:11:02 +00:00
Add field names to pallet Event variants (#9993)
* convert pallet-assets events to struct types * updated events of a couple pallets * updated pallet event field names * update pallet event field names * updated events in test files * cargo fmt * minorfixes * fix assertion error * minor fix * formatting fix * fmt
This commit is contained in:
@@ -128,7 +128,7 @@ benchmarks_instance_pallet! {
|
||||
let proposal_hash = T::Hashing::hash_of(&proposal);
|
||||
// Note that execution fails due to mis-matched origin
|
||||
assert_last_event::<T, I>(
|
||||
Event::MemberExecuted(proposal_hash, Err(DispatchError::BadOrigin)).into()
|
||||
Event::MemberExecuted { proposal_hash, result: Err(DispatchError::BadOrigin) }.into()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ benchmarks_instance_pallet! {
|
||||
let proposal_hash = T::Hashing::hash_of(&proposal);
|
||||
// Note that execution fails due to mis-matched origin
|
||||
assert_last_event::<T, I>(
|
||||
Event::Executed(proposal_hash, Err(DispatchError::BadOrigin)).into()
|
||||
Event::Executed { proposal_hash, result: Err(DispatchError::BadOrigin) }.into()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ benchmarks_instance_pallet! {
|
||||
// New proposal is recorded
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), p as usize);
|
||||
let proposal_hash = T::Hashing::hash_of(&proposal);
|
||||
assert_last_event::<T, I>(Event::Proposed(caller, p - 1, proposal_hash, threshold).into());
|
||||
assert_last_event::<T, I>(Event::Proposed { account: caller, proposal_index: p - 1, proposal_hash, threshold }.into());
|
||||
}
|
||||
|
||||
vote {
|
||||
@@ -359,7 +359,7 @@ benchmarks_instance_pallet! {
|
||||
verify {
|
||||
// The last proposal is removed.
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
assert_last_event::<T, I>(Event::Disapproved(last_hash).into());
|
||||
assert_last_event::<T, I>(Event::Disapproved { proposal_hash: last_hash }.into());
|
||||
}
|
||||
|
||||
close_early_approved {
|
||||
@@ -440,7 +440,7 @@ benchmarks_instance_pallet! {
|
||||
verify {
|
||||
// The last proposal is removed.
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
assert_last_event::<T, I>(Event::Executed(last_hash, Err(DispatchError::BadOrigin)).into());
|
||||
assert_last_event::<T, I>(Event::Executed { proposal_hash: last_hash, result: Err(DispatchError::BadOrigin) }.into());
|
||||
}
|
||||
|
||||
close_disapproved {
|
||||
@@ -514,7 +514,7 @@ benchmarks_instance_pallet! {
|
||||
}: close(SystemOrigin::Signed(caller), last_hash, index, Weight::max_value(), bytes_in_storage)
|
||||
verify {
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
assert_last_event::<T, I>(Event::Disapproved(last_hash).into());
|
||||
assert_last_event::<T, I>(Event::Disapproved { proposal_hash: last_hash }.into());
|
||||
}
|
||||
|
||||
close_approved {
|
||||
@@ -586,7 +586,7 @@ benchmarks_instance_pallet! {
|
||||
}: close(SystemOrigin::Signed(caller), last_hash, p - 1, Weight::max_value(), bytes_in_storage)
|
||||
verify {
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
assert_last_event::<T, I>(Event::Executed(last_hash, Err(DispatchError::BadOrigin)).into());
|
||||
assert_last_event::<T, I>(Event::Executed { proposal_hash: last_hash, result: Err(DispatchError::BadOrigin) }.into());
|
||||
}
|
||||
|
||||
disapprove_proposal {
|
||||
@@ -634,7 +634,7 @@ benchmarks_instance_pallet! {
|
||||
}: _(SystemOrigin::Root, last_hash)
|
||||
verify {
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
assert_last_event::<T, I>(Event::Disapproved(last_hash).into());
|
||||
assert_last_event::<T, I>(Event::Disapproved { proposal_hash: last_hash }.into());
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(Collective, crate::tests::new_test_ext(), crate::tests::Test);
|
||||
|
||||
Reference in New Issue
Block a user