Skip to content

Commit

Permalink
Emit court opened event (#1165)
Browse files Browse the repository at this point in the history
emit court opened event
  • Loading branch information
Chralt98 authored Oct 25, 2023
1 parent f2f5081 commit 7e95e90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zrml/court/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ mod pallet {
where
T: Config,
{
/// A court case was opened.
CourtOpened { market_id: MarketIdOf<T>, court_info: CourtOf<T> },
/// A juror has been added to the court.
JurorJoined { juror: T::AccountId, stake: BalanceOf<T> },
/// A court participant prepared to exit the court.
Expand Down Expand Up @@ -2146,11 +2148,13 @@ mod pallet {
T::DisputeResolution::add_auto_resolve(market_id, court.round_ends.appeal)?;

<SelectedDraws<T>>::insert(court_id, new_draws);
<Courts<T>>::insert(court_id, court);
<Courts<T>>::insert(court_id, court.clone());
<MarketIdToCourtId<T>>::insert(market_id, court_id);
<CourtIdToMarketId<T>>::insert(court_id, market_id);
<NextCourtId<T>>::put(next_court_id);

Self::deposit_event(Event::CourtOpened { market_id: *market_id, court_info: court });

let res = ResultWithWeightInfo {
result: (),
weight: T::WeightInfo::on_dispute(pool_len, ids_len),
Expand Down

0 comments on commit 7e95e90

Please sign in to comment.