From 089f013eab9ab300f561d3ca03cbf2ed318276c3 Mon Sep 17 00:00:00 2001 From: Thomas Niederberger Date: Wed, 9 Oct 2024 11:32:03 +0200 Subject: [PATCH] Fix failing test --- src/api/rpc_api/author.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/rpc_api/author.rs b/src/api/rpc_api/author.rs index 062fed414..c9c345877 100644 --- a/src/api/rpc_api/author.rs +++ b/src/api/rpc_api/author.rs @@ -213,7 +213,7 @@ pub trait SubmitAndWatch { ) -> Result>; /// Query the events for the specified `report` and attaches them to the returned report. - /// If the function fails the report is not modified. + /// If the function fails events might still be added to the report. /// /// This method is blocking if the sync-api feature is activated async fn populate_events(&self, report: &mut ExtrinsicReport) -> Result<()>; @@ -302,13 +302,13 @@ where break } } + report.events = Some(extrinsic_events.into_iter().map(|event| event.to_raw()).collect()); if let Some(dispatch_error) = maybe_dispatch_error { return Err(Error::FailedExtrinsic(FailedExtrinsicError::new( dispatch_error, report.encode(), ))) } - report.events = Some(extrinsic_events.into_iter().map(|event| event.to_raw()).collect()); Ok(()) }