include dispatch result in the Executed event (#9315)

* include dispatch result in the Executed event

* fix

* trigger CI
This commit is contained in:
Xiliang Chen
2021-07-21 02:40:11 +12:00
committed by GitHub
parent 2b282a9435
commit e17a014627
2 changed files with 7 additions and 6 deletions
@@ -25,7 +25,7 @@ use frame_support::{
traits::{Currency, Get, EnsureOrigin, OnInitialize, UnfilteredDispatchable, schedule::DispatchTime},
};
use frame_system::{RawOrigin, Pallet as System, self};
use sp_runtime::traits::{Bounded, One};
use sp_runtime::traits::{Bounded, One, BadOrigin};
use crate::Pallet as Democracy;
@@ -759,7 +759,7 @@ benchmarks! {
}: enact_proposal(RawOrigin::Root, proposal_hash, 0)
verify {
// Fails due to mismatched origin
assert_last_event::<T>(Event::<T>::Executed(0, false).into());
assert_last_event::<T>(Event::<T>::Executed(0, Err(BadOrigin.into())).into());
}
#[extra]